sub max { my $max = shift; $max = ($max < $_) ? $_ : $max foreach @_; return $max; }