# The three-argument version of open, and using lexical variables is preferred open my $LOG_READ, '<', $InLogFilePath or die "Can't open file $InLogFilePath: $!"; # Read the next line into $current_line while (my $current_line = <$LOG_READ>) { # Ignore the first $InStartLineNumber lines of the file next if $. < $InStartLineNumber; # Process current line . . . } close $LOG_READ;