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.
In Section
Seekers of Perl Wisdom