Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
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 chanting in the Monastery: (3)
As of 2016-10-01 03:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (574 votes). Check out past polls.