⭐ in reply to How do I test whether a file has some contents or not?
Filetest operators can be found at perlfunc:_X. Just a day or so ago swiftone showed me the "_" shortcut for performing multiple tests on one file. Yet another way to look at it.
if (-s $file && -T _) { # do stuff with text file > 0bytes } if (-s $file && -B _) { # do stuff with binary file > 0bytes }
In Section
Seekers of Perl Wisdom