Sounds like a perfect use for the flip-flop operator.
use strict; use warnings; while (<DATA>) { next unless /^internal name/ .. 0; next unless /^need this/; # your code here... print $_; } __DATA__ a line need this (not really) another line internal name another line a further line need this another line need this
Note that by using a zero as the righthand operand, we get a flip-flop that turns on but then never turns off.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: seek and process from there on
by davorg
in thread seek and process from there on
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |