Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re^3: Read File Backwordby coec (Chaplain) |
on Jul 28, 2004 at 01:46 UTC ( [id://377902]=note: print w/replies, xml ) | Need Help?? |
Given that Tie::File reads the whole file into an array whereas File::ReadBackwards just 'reads the file backwards', definately File::ReadBackwards is more efficient. I converted a KSH script to Perl, using File::ReadBackwards and got a 400x increase in speed. YMMV CC I should have mentioned that the KSH script was *not* badly written. It also parsed many files that were 300-500M in size, where the info it needed was typically in the last thousand lines.
In Section
Seekers of Perl Wisdom
|
|