Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Ternary vs. Sort vs. Max

by shmem (Chancellor)
on Aug 10, 2015 at 10:31 UTC ( #1138001=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $max = ($x,$y)[$x<$y];
    $min = ($x,$y)[$x>$y];
    
  2. or download this
    if ($x < $y ) {
        $max = $y;
    ...
    else {
        $max = $x;
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2021-01-17 12:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?