my @buffer; while ... if( start condition ){ if( @buffer ){ INFO("start condition without end condition, discarding buffer +"); } @buffer = $line; } elsif( end condition ){ print OUTFILE @buffer; undef @buffer; } else { push @buffer, $line; }
In reply to Re: Matching consecutive "different" regex patterns across multiple lines
by Anonymous Monk
in thread Matching consecutive "different" regex patterns across multiple lines
by eh3civic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |