in reply to How do I read a file line by line in reverse order (from EOF to start of file)

You could use File::ReadBackwards. Even better, imho, would be to use Tie::File, which maps the lines of a file into an in-memory array; then you'd simply traverse that array in descending index order.
use Tie::File; tie my @lines, 'Tie::File', $filename; for my $i ( reverse 0 .. $#@lines ) { do_something_with( $lines[$i] ); }
  • Comment on Re: How do I read a file line by line in reverse order (from EOF to start of file)
  • Download Code