http://www.perlmonks.org?node_id=927542


in reply to Re: Check for an empty file
in thread Check for an empty file

I had some trouble with this a while back. -s returns a zero if the file is either zero bytes or nonexistent. It got a bit confusing until I worked out what was happening.