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

Re: Re: Re: Command line tool coding style?

by perrin (Chancellor)
on Jan 16, 2002 at 07:43 UTC ( #139132=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    eval('&' . $action . '()');
    if( $@ ) {
        die "Usage\n";
    }
    
  2. or download this
    my $subref = \&{$action};
    die "Usage" unless defined &$subref();
    
  3. or download this
    my %dispatch = (
                    'this' => \&do_this,
    ...
    if (defined $dispatch{$action}) {
        &$dispatch{$action};
    } else { die "Usage\n"; }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2014-04-16 20:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (433 votes), past polls