#!perl use strict; use warnings; my $vector = (1,23, 3, 2.0**37, -1.0 * 10 ** (-41), 10.0**19); my $max; $max = $vector[0]; $max = $_ if $max > $_ foreach (@vector[1..$#vector]); print "$max\n";