Like your foreach method.
Btw, if the sub is called a lot, would it be faster to have the values hard-coded into @comparisons rather than have them generated using map?
Added: I think you mistyped (i.e. missing ->):
if $points > $cmp[0] && $quota < $cmp[1] Should be: if $points > $cmp->[0] && $quota < $cmp->[1]
In reply to Re^2: alternatives to if and series of elsif
by kiat
in thread alternatives to if and series of elsif
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |