my $default_action = 'dothis'; my %actions = ( dothis => \&do_this, dothat => \&do_that, dosomethingelse => \&do_something_else, ); my $action = param('action'); $action = $default{action} unless defined $actions{$action}; &{$actions{$action}}();
In reply to Re: Framing my scripts
by dsheroh
in thread Framing my scripts
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |