Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by perrin (Chancellor)
on Jan 16, 2002 at 07:43 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://139132]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-03-28 21:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found