http://www.perlmonks.org?node_id=1138103


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.