Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Finding the max()/min()

by elusion (Curate)
on Nov 11, 2004 at 02:48 UTC ( #406887=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub max {
        my ($max, @vars) = @_;
        for (@vars) {
    ...
        }
        return $max;
    }
    
  2. or download this
    sub max {
        my ($max, $next, @vars) = @_;
        return $max if not $next;
        return max( $max > $next ? $max : $next, @vars );
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://406887]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-12-26 05:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (165 votes), past polls