in reply to Re^2: Reversing A File
in thread Reversing A File

Unfortunately, this firm doesn't have File::ReadBackwards and it's a real pain getting approval for non-core modules!

I tried the Tie::File idea (thanks for that), but killed the job after 10mins of max'd out cpu (it was about half way through) - the file is only 180MB

There must be a faster way??

Replies are listed 'Best First'.
Re^4: Reversing A File
by marto (Cardinal) on Dec 12, 2007 at 13:50 UTC
    Ten minutes to get half way through processing a 180MB file? What spec of machine are you running this on? Have you tried something like tail -r filename.log >> backwards.log (if your OS supports it) and compared the time that it takes to finish?

    Martin
Re^4: Reversing A File
by runrig (Abbot) on Dec 12, 2007 at 15:42 UTC
    File::ReadBackwards is pure perl, all you have to do is copy the source to a file...what's the difference between that and writing your own module that does the same thing (besides the amount of work)?