my $max_number; #initialize a variable that keeps the maximum number #### if(!defined($max_number) or $current_number > $max_number) { $max_number = $current_number; #compare each time the number we have in the line with the max number }