in reply to Clumping file data together
If you've seen the `on' delimiter, set a flag that you should be printing. Set the flag apropriately whenever a delimiter is encountered. You might also consider Mail::Folder or Mail::Box.
my $printing; while( <INPUT> ) { if( /^From (\w+)/ ) { if( $1 eq 'mailsnarf' ) { $printing = 1; } else { $printing = undef; } } print if $printing; }
|
|---|