In an ideal world (and most cases), Perl will beat cat in a file read.
If you're running on Linux, this isn't the case, and cat is actually faster. See the enlightened node by
.
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
. Seems to work for Linux, but will seriously slow down other OSes.