Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
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 rifling through the Monastery: (5)
As of 2015-05-27 02:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    In my home, the TV remote control is ...









    Results (521 votes), past polls