my $max = maximum(@values); sub maximum { my $max = shift; for my $arg (@_) { $max = $arg if $arg > $max; } return $max; }