in reply to (tye)Re5: Slurp a file
in thread Slurp a file

Just a few questions:

What types of filehandlers would not return the correct size with -s?

And do you know a better way to get the size of a filehandle than using -s?

Replies are listed 'Best First'.
(tye)Re6: Slurp a file
by tye (Sage) on Jan 15, 2001 at 22:54 UTC

    What types of filehandlers would not return the correct size with -s?

    Mostly pipes and user input devices (terminals/consoles). -s pretty much only works on file handles connected to oridinary files. For the other cases, the only way to determine the amount of data before EOF is to read it all.

            - tye (but my friends call me "Tye")