Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: assigning the maximum of two numbers

by QM (Parson)
on Nov 03, 2005 at 19:06 UTC ( [id://505479]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub assignmax5 {
        @a = sort@_;
        pop @a;
    }
    
  2. or download this
    sub assignmax5 {
        return (sort @_)[-1];
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found