in reply to How do I test whether a file has some contents or not?

if ( -s 'file') { print "file exists and has size > 0\n"; }

Originally posted as a Categorized Answer.