http://qs321.pair.com?node_id=737006


in reply to Filesize (-s) is consistenly reporting too small of size in Win32

Just a guess but it might be counting the \r\n as a single line-ending. Is your test file 2179 lines long?

Seems like you could treat all files as binary and skip the automatic line-ending conversion (see binmode).

  • Comment on Re: Filesize (-s) is consistenly reporting too small of size in Win32

Replies are listed 'Best First'.
Re^2: Filesize (-s) is consistenly reporting too small of size in Win32
by Anonymous Monk on Jan 17, 2009 at 10:34 UTC
    No, not possible. -s/stat doesn't do any counting, it consults the filesystem.