Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Ternary vs. Sort vs. Max

by sundialsvc4 (Abbot)
on Aug 11, 2015 at 03:35 UTC ( [id://1138103]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Ternary vs. Sort vs. Max
in thread Ternary vs. Sort vs. Max

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^4: Ternary vs. Sort vs. Max
by Laurent_R (Canon) on Aug 12, 2015 at 21:31 UTC
    You should really take a look at Perl 6: it enables you to build your own infix max operator in just a couple of code lines (see for example Moritz's tutorial on the subject: http://perlgeek.de/en/article/5-to-6#post_13). So that you could have something like:
    if ($c max $d > 5) { # ... }
    Oh, but I forgot, you absolutely (and unreasonably IMHO) hate Perl 6, too bad for you, or maybe you should reconsider your opinion on the subject.

    And, BTW, NO, I did not downvote your post. If anyone did, it's not me.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-03-28 13:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found