Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: How to conditionally execute a subroutine defined as hash value

by Corion (Patriarch)
on Apr 02, 2014 at 10:55 UTC ( #1080749=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $config= 'A' eq $test
                ? \%config_A
                : \%config_B;
    
  2. or download this
    my %config= (
        A => \%config_A,
    ...
    
    my $config= $config{ $test }
        or die "Unknown test '$test'";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-12-05 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?