in reply to Re: Testing if a .txt file contains any data
in thread Testing if a .txt file contains any data

Using this code it will always print "File is loaded." regardless if there is any text in the file or not. I've also tried using -z and still get the same problem.
if(! -s $wordlist) { print "File is empty\n"; exit 0; } else { print "File is loaded." }