my $highest = pop @list; foreach (@list) { $highest = $_ if $_ > $highest; }