my $highest = pop sort { $a <=> $b } @list; #### my $highest = pop @list; foreach (@list) { $highest = $_ if $_ > $highest; }