Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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. :\ In reply to Re: Is there a way to read a file backwards?
by jlp
|
|