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
In reply to Re: selcting a specific file
by toolic
in thread selcting a specific file
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |