in reply to Re: Getting next line after matched one
in thread Getting next line after matched one
my $flag = 0; while( <FILE> ) { if ( /test/ ) { print; $flag = 1; } elsif ( $flag ) { print; $flag = 0; } }
--Solo
--
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.
|
|---|