"R. Joseph Newton" wrote: > > "John W. Krahn" wrote: > > > > use File::ReadBackwards; > > > > tie *FILE, 'File::ReadBackwards', $file > > or die "Cannot open $file: $!"; > > > > while ( <FILE> ) { > > chomp; > > print scalar reverse, "\n"; > > } > > > > __END__ > > Looks cool, and perfectly tailored to the task. How is it for handligg > muti-charcter newlines?
The documentation states that this is handled correctly. perldoc File::ReadBackwards [snip] DESCRIPTION This module reads a file backwards line by line. It is simple to use, memory efficient and fast. It supports both an object and a tied handle interface. It is intended for processing log and other similar text files which typically have their newest entries appended to them. By default files are assumed to be plain text and have a line ending appropriate to the OS. But you can set the input record separator string on a per file basis. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>