... # start from the line my $last_line_it_got_to = 209848; foreach my $line ( $last_line_it_got_to .. $#lines ) { print $lines[$line]; # OR do what you want }