Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Finding the max()/min()

by Zaxo (Archbishop)
on Nov 11, 2004 at 02:38 UTC ( [id://406885]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # max
    my $max = ($x, $y)[$x < $y];
    
    # min
    my $min = ($x, $y)[$x > $y];
    
  2. or download this
    sub max ($$) { $_[$_[0] < $_[1]] }
    sub min ($$) { $_[$_[0] > $_[1]] }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-24 01:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found