Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 having an uproarious good time at the Monastery: (9)
As of 2015-07-08 04:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (94 votes), past polls