Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^4: Range Operator in If Statement

by Not_a_Number (Parson)
on Jan 06, 2012 at 11:15 UTC ( #946580=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my @array = ( 'A' .. 'F' );
    my $ref_number = 42; # or whatever
    my $index = ( $ref_number - 1 ) / 8;
    my $bundle = $array[ $index ];
    print $bundle;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://946580]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-09-15 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (145 votes), past polls