There's more than one way to do things | |
PerlMonks |
(tye)Re5: Slurp a fileby tye (Sage) |
on Jan 15, 2001 at 21:19 UTC ( [id://51962]=note: print w/replies, xml ) | Need Help?? |
Unfortunately, this isn't completely portable. There are minor (as far as I can tell) problems with some operating systems where the size of a file on disk doesn't always match the size of data read into memory. The big problems have to do with the great many types of filehandles where -s can't tell the file size. But, yes, when it works, this is a neat trick. Thanks. - tye (but my friends call me "Tye")
In Section
Cool Uses for Perl
|
|