in reply to Read File Backword

check out File::ReadBackwards

HTH

Sweetblood

Replies are listed 'Best First'.
Re^2: Read File Backword
by eserte (Deacon) on Jul 27, 2004 at 19:45 UTC
    ... which is more efficient on large files than Tie::File.
      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.