Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Using Number Ranges in a Dispatch Table

by planetscape (Canon)
on Feb 18, 2012 at 18:35 UTC ( #954778=perlquestion: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    
    $dispatch{0}->();
    $dispatch{23}->();
    
  2. or download this
        map { $_ => \&action_124_to_140 }
          ( 124 .. 140, 143 .. 146, 148 .. 149, 160 .. 169, 181 .. 189 ),
    
  3. or download this
        map { $_ => \&action_89930_to_89999 } ( 89930 .. 89999 ),
    
  4. or download this
    $dispatch{1000}->();
    
  5. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
    89930
    89999
    89963
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://954778]
Approved by Perlbotics
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (14)
As of 2014-07-10 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (214 votes), past polls