if ( -s 'file') { print "file exists and has size > 0\n"; }
Originally posted as a Categorized Answer.
In reply to Re: How do I test whether a file has some contents or not?
by Anonymous Monk
in thread How do I test whether a file has some contents or not?
by Hen_true
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |