Perl: the Markov chain saw | |
PerlMonks |
Re^2: Is the number before, in or after the interval? using spaceship operator <=>by rsFalse (Chaplain) |
on Nov 21, 2014 at 14:43 UTC ( [id://1108015]=note: print w/replies, xml ) | Need Help?? |
Hm.. yes. And that is simpler solution with two basic comparisons: map { ("-1", " 0", " 1")[ ($_ >= $l) + ($_ > $r) ] } -9 .. 10;
In Section
Seekers of Perl Wisdom
|
|