in reply to Re: Get file min and max size help!
in thread Get file min and max size help!

Still getting the same issue message:
Warning: Use of "-s" without parentheses is ambiguous at test.pl line 19. Unterminated <> operator at test.pl line 19.

Replies are listed 'Best First'.
Re^3: Get file min and max size help!
by roboticus (Chancellor) on Aug 29, 2011 at 19:00 UTC

    Never mind ... apparently today I'm an idiot...

    Reading the documentation reveals that -s doesn't return a number. Instead, it indicates whether has nonzero size. If you need to know the file size, you'll have to use a suitable function to read the file size, and *then* compare it.

    ...roboticus

    When your only tool is a hammer, all problems look like your thumb.

      Actually it does, at least according to perlfunc and to my experience:

      -s File has nonzero size (returns size in bytes).