in reply to File Size Check

-z does not return a number, it returns undef (if the file is non-zero length) or an empty string if the file is zero length. Were you thinking of -s?

Replies are listed 'Best First'.
Re^2: File Size Check
by tinita (Parson) on Mar 29, 2008 at 10:51 UTC
    just a little correction, it returns true (1) if the file is empty and false (the empty string) if the file has content. at least on my system. perl 5.8.8, linux.