in reply to Re: using smartmatch for range matching
in thread using smartmatch for range matching

IMHO it's also MUCH more efficient than the smartmatch, which will check against every element of a potentially huge temporary array, instead of just the boundaries.

Edit

And certainly better readable.

Saying so, having an in LIST operator wouldn't harm, but that's not the demonstrated use case.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^3: using smartmatch for range matching
by jwkrahn (Abbot) on Nov 25, 2023 at 19:39 UTC

    Sorry, but this sticks out like a sore thumb!

    And certainly better readable.

    Either:

    And certainly better readability.

    Or maybe:

    And certainly more readable.

           :-)
    
    Naked blocks are fun! -- Randal L. Schwartz, Perl hacker
      Broken English is the most spoken language in the world. Better adapt! ;p

      Funny enough, I literally just read a discussion in the guardian where a bunch of Brits were discussing how easy English supposedly was.

      The less languages they knew, the more confident they were ... xD

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery

      PS: "He who learns a new language acquires a new soul" - Czech proverb(?)

        The less languages they knew, the more confident they were ... xD

        Native English speaker here. Pet peeve, but it's the fewer languages they knew. "less" is for continuous quantities, "fewer" is for discrete. "less money" vs "fewer pounds"

        I think this illustrates nicely that English is most definitely not easy.


        🦛