There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Quick answer:
In an ideal world (and most cases), Perl will beat cat in a file read. Caveat: If you're running on Linux, this isn't the case, and cat is actually faster. See the enlightened node by tye on this subject here. A minor work around (read ugly hack) to get Linux to work faster was to use a read statement, and break down the block into lines using a reader object. Seems to work for Linux, but will seriously slow down other OSes. Malk In reply to Re: cat vs. file handle speed?
by Malkavian
|
|