open(my $fh, '<', $InLogFIlePath) or die("Can't open \"$InLogFIlePath\": $!\n"); while (<$fh>) { next if $. < $InStartLineNumber; ... }