in reply to selcting a specific file

The -z filetest works for me on *nix:
use warnings; use strict; my @files = <*.txt>; for (@files) { if (-z $_) { print "File $_ is empty\n"; } else { print "File $_ is not empty\n"; } }
I have 3 files in my current directory. Only the file named "a.txt" is empty. When I run the program above, I get this output:
File a.txt is empty File b.txt is not empty File c.txt is not empty