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

... which is more efficient on large files than Tie::File.

Replies are listed 'Best First'.
Re^3: Read File Backword
by coec (Chaplain) on Jul 28, 2004 at 01:46 UTC
    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.