use experimental 'smartmatch'; if (($y-$x) ~~ [-1, 0, +1]) { ... } [download]
In reply to Re: IF condition with a range by Anonymous Monk in thread IF condition with a range by Anonymous Monk