Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Read File Backword

by coec (Chaplain)
on Jul 28, 2004 at 01:46 UTC ( [id://377902]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Read File Backword
in thread Read File Backword

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://377902]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-19 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found