my $linesToSkip = 2; while ( ) { next if 0 < $linesToSkip --; # Do something here with the lines of interest. ... }