Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 perusing the Monastery: (7)
As of 2015-07-03 22:46 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 (57 votes), past polls