Problems? Is your data what you think it is? | |
PerlMonks |
Re: How to handle the error when we try to read an empty text file in perlby Discipulus (Canon) |
on Jan 28, 2015 at 07:52 UTC ( [id://1114713]=note: print w/replies, xml ) | Need Help?? |
Hello ppp, i think your assumption is wrong: Perl does not complain for an empty file
You must have some other issue like permission, path or other. Anyway you can test the size of a file with file test operators: Also see sysopen to have a more granular approach opening files HtH L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|