In article <[EMAIL PROTECTED]> wrote "Jeff
'Japhy' Pinyan"
<[EMAIL PROTECTED]>:
>>I have a set of functions that give numeric results, and I need to compare them and
>choose the
>>maximal value. Is there any simple way of finding max?
>
> Go through them one at a time, and keep track of the largest value:
>
> my $max = $values[0];
> for (@values) {
> $max = $_ if $_ > $max;
> }
>
Don't think about it,
just use the CPAN module List::Util.
Then you only have to write
my $max = max @values;
Greetings,
Andrea
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]