Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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?
[Discipulus]: are we not yet in Summer?
Discipulus yesteday saw flowered poppins outside..
[marto]: This won't take till Summer to complete I hope ;)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2017-12-18 21:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (498 votes). Check out past polls.

    Notices?