Welcome to the Monastery | |
PerlMonks |
Re^5: file reading issuesby kwaping (Priest) |
on Aug 04, 2005 at 15:08 UTC ( [id://480856]=note: print w/replies, xml ) | Need Help?? |
Thanks for the update, that does help clarify your post. The only area I see in which my way would be superior is if you didn't want to read the entire file, but instead only X bytes from it. As you know, the desired byte count is the third parameter passed to the "read" function. I haven't done any benchmarking, this is just my semi-educated guess. Update: After running a benchmark, it appears my way is substantially faster! See below, the numbers are seconds taken to execute 1000 loops of the code. See Speed reading (files).
In Section
Seekers of Perl Wisdom
|
|