go ahead... be a heretic | |
PerlMonks |
Re: Is the number before, in or after the interval? using spaceship operator <=>by LanX (Saint) |
on Nov 21, 2014 at 02:37 UTC ( [id://1107975]=note: print w/replies, xml ) | Need Help?? |
already combining ($_ <=> $l) + ($_ <=> $r) gives you more details (abs == 1 when border hit) and you can easily derive any info needed.
if you need to ignore borders try -($_ < $l) || ($_ > $r)
Cheers Rolf (addicted to the Perl Programming Language and ☆☆☆☆ :)
In Section
Seekers of Perl Wisdom
|
|