my $lines_to_skip = 14; while (my $line = <$file>) { # $. will give you the current line number of the file next if ($. <= $lines_to_skip); chomp($line); # Do stuff with $line }