http://www.perlmonks.org?node_id=535344


in reply to Re^7: Matching string, then getting next line
in thread Matching string, then getting next line

Not sure this is going to work, as it will never find the message i am looking for, should i not be using something like the (.*) so store the contents between Message Dump: and Message Dump:
  • Comment on Re^8: Matching string, then getting next line

Replies are listed 'Best First'.
Re^9: Matching string, then getting next line
by wazoox (Prior) on Mar 09, 2006 at 09:33 UTC
    Well if you know what's you're looking for, probably matching it directly would be easier then.
    my $message; while (<FILE>) { if ( m/\d\d \d\d\/\d\d\/\d\d \d\d:\d\d:\d\d:\d\d\d .*/ ) { $message .= $_ } }