Simple, by using a dispatch table:
my %handlers = ( table1 => \&_upload_table1, table2 => \&_upload_table2, ); $tablename=cgi->param('tablename'); my $handler = $handlers{$tablename}; $handler->(args);
In reply to Re: Calling different methods based on a CGI parameter
by Corion
in thread Calling different methods based on a CGI parameter
by palette
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |