in reply to Re: Range Operator in If Statement
in thread Range Operator in If Statement
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Range Operator in If Statement
by mmartin (Monk) on Jan 05, 2012 at 19:23 UTC | |
by Not_a_Number (Prior) on Jan 06, 2012 at 11:15 UTC | |
by mmartin (Monk) on Jan 06, 2012 at 17:30 UTC |