in reply to Re^6: Matching string, then getting next line
in thread Matching string, then getting next line
my @messages; my $inmessage = 0; # 0 false, 1 true while ( <FILE> ) { s/\r\n$/\n/ ; if ( $inmessage) { push $_, @messages; } if ( m/Message Dump:.*/ ) { # we set $inmessage to 1 if 0, or 0 if 1 $inmessage = abs( $inmessage -1 ) ; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^8: Matching string, then getting next line
by minixman (Beadle) on Mar 09, 2006 at 08:15 UTC | |
by wazoox (Prior) on Mar 09, 2006 at 09:33 UTC |