I'm SURE there is a 100 different ways to do this...
Here's one way to assign to $bundle that requires a lot less typing. Replace your call to get_bundle and the sub itself with:
$bundle = [ 'A' .. 'F' ]->[ ( $ref_number - 1 ) / 8 ];Update: Removed unnecessary parentheses around the arrayref.
In reply to Re^2: Range Operator in If Statement
by Not_a_Number
in thread Range Operator in If Statement
by mmartin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |