Use the -s test:
use strict; use warnings; for my $file (qw/bar.txt barwithdata.txt/) { next unless -s $file > 114; print "file $file has data\n"; }
Note that 114 is the number for my O/S. Yours may differ due to different EOL/EOF patterns.
In reply to Re: How do I skip reading files with missing data?
by hippo
in thread How do I skip reading files further with missing data?
by Ppeoc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |