in reply to trying to do a parse based on starting position.

Another way to do it:

my $line; while ( <> ) { if ( /LUN 40/ ) { $line = $. + 2; } if ( $line == $. ) { print; } }