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


in reply to Re^2: -s testing for empty file; works on local, but not on remote
in thread -s testing for empty file; works on local, but not on remote

There is one difference:

If you don't check for errors, errors (incl non-existent files) being returned by -s will be mistaken as empty file.

If you don't check for errors, errors (incl non-existent files) being returned by -z will be mistaken as non-empty file.