tomazos has asked for the wisdom of the Perl Monks concerning the following question:
So I want to do this:
while (<FILE>) { ... do something with $_ ... }
...but rather than process the first line first, I want to process the last line first, and then process the second last line, and then the third last line, all the way to the first line.
Any ideas about how to do this elegantly and efficiently?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Processing text file in reverse-order linewise
by andyford (Curate) on Aug 14, 2006 at 22:10 UTC | |
Re: Processing text file in reverse-order linewise
by ikegami (Patriarch) on Aug 14, 2006 at 23:33 UTC | |
Re: Processing text file in reverse-order linewise
by davidrw (Prior) on Aug 14, 2006 at 23:19 UTC |
Back to
Seekers of Perl Wisdom