in reply to seek and process from there on

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.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg