Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: using smartmatch for range matching

by ikegami (Patriarch)
on Nov 26, 2023 at 22:56 UTC ( [id://11155861] : note . print w/replies, xml ) Need Help??


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

It's a trivial sub you can write yourself:

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