sub min { my $rv = shift; while (my $tmp = shift) { $rv = $tmp if $tmp < $rv; } return $rv; } print "Min test: ", min(5,0,-10), "\n";