if (-s $file && -T _) { # do stuff with text file > 0bytes } if (-s $file && -B _) { # do stuff with binary file > 0bytes }
In reply to Re: How do I test whether a file has some contents or not?
by ybiC
in thread How do I test whether a file has some contents or not?
by Hen_true
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |