in reply to Extracting the last desired block of text from a server eMail file
You of course could use File::ReadBackwards by itself# not tested of course my @message; my $io = io('mail_file')->backwards->chomp; while (my $line = $io->getline) { unshift @message, $line; last if($line =~ m/$message_start_pattern/); } # @message now contains all lines of the # last message in correct order for(@message){ last if($_ eq "Content-Type: text/html;"); print "$_\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Extracting the last desired block of text from a server eMail file
by hackermike (Novice) on Sep 17, 2004 at 05:46 UTC |