in reply to Define string on current line, then match other lines with string below the line

seek and tell may be useful. There's an example in seek that is almost what you need. I would try something like this (untested):
while (my $line = <$info>) { my $next_line_start = tell($info); # save start position of next l +ine if ($line =~ /regex/) { do_something_here; } # reposition at $next_line_start seek($info,$next_line_start,0); }

Update: removed defined in the while test, as it is included (here, at least) in while magic.

-QM
--
Quantum Mechanics: The dreams stuff is made of