Preceptor has asked for the wisdom of the Perl Monks concerning the following question:
(The actual sub, and the validation is missing for simplicity).my %command_list = ( 'update' => { args => 2, function => *refresh_list, }, ); my $input=$ARGV[0] &{ $command_list{$input}{'function'} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best way to handle 'commands'
by blakem (Monsignor) on Sep 19, 2002 at 11:18 UTC | |
by Preceptor (Deacon) on Sep 19, 2002 at 11:27 UTC | |
by blakem (Monsignor) on Sep 19, 2002 at 12:24 UTC | |
by goldclaw (Scribe) on Sep 20, 2002 at 02:37 UTC | |
|
Re: Best way to handle 'commands'
by fglock (Vicar) on Sep 19, 2002 at 13:04 UTC | |
by FoxtrotUniform (Prior) on Sep 19, 2002 at 15:20 UTC |