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

Re: Switch.pm or possible alternatives

by Joost (Canon)
on May 20, 2005 at 12:48 UTC ( [id://458956]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $contition = $some_letter;
    
    ...
    );
    $dispatch{$condition}->();
    
  2. or download this
    my @dispatch = (
      sub { shift() eq 'a' } => sub { "do something with a" },
    ...
    for (my $i; $i < @dispatch; $i+=2) {
      $dispatch[$i+1]->() if $dispatch[$i]->($variable);
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://458956]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-24 22:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found