in reply to Testing if a .txt file contains any data
my $wordlist = 'wordlist.txt'; if(! -s $wordlist) { print "File is empty\n"; exit 0; } else { # your code goes here }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Testing if a .txt file contains any data
by Tux (Canon) on Jan 30, 2015 at 07:01 UTC | |
|
Re^2: Testing if a .txt file contains any data
by sigmaaa (Initiate) on Jan 30, 2015 at 01:10 UTC |