Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Finding the max()/min()

by elusion (Curate)
on Nov 11, 2004 at 02:48 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://406887]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 19:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found