in reply to selcting a specific file
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:use warnings; use strict; my @files = <*.txt>; for (@files) { if (-z $_) { print "File $_ is empty\n"; } else { print "File $_ is not empty\n"; } }
File a.txt is empty File b.txt is not empty File c.txt is not empty
|
|---|