Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: using smartmatch for range matching

by choroba (Cardinal)
on Nov 26, 2023 at 22:20 UTC ( [id://11155860]=note: print w/replies, xml ) Need Help??


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

> in_range( $number, 1416, 1494 )

What module does it come from?

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^3: using smartmatch for range matching
by ikegami (Patriarch) on Nov 26, 2023 at 22:56 UTC

    It's a trivial sub you can write yourself:

    sub in_range { $_[1] <= $_[0] <= $_[2] }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-14 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found