On Feb 12, Hans Holtan said: >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; } -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]