http://qs1969.pair.com?node_id=25207


in reply to Is there a way to read a file backwards?

If you're not worried about memory consumption, you could just do:

 my @reverse_lines = reverse <FH>;

This will read the whole file into memory, and is thus not very memory efficient, but it is probably the simplest way to do what you want.

UPDATE: Whoops, that'll teach me to not read closely enough; I just noticed you said you didn't want to read the whole file; sorry. :\