Look into the "scalar-context version" of the .. operator in perlop. E.g.
while ( <> ) { if ( my $c = /^(mykeyword1|mykeyword2)$/../^\Q***END***\E$/ ) { next if $c == 1 || $c =~ /E/; print; } }
Update: Simplified second regexp slightly.
the lowliest monk
In reply to Re: searching data lines between keywords
by tlm
in thread searching data lines between keywords
by riz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |