Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Calling different methods based on a CGI parameter

by Corion (Patriarch)
on May 21, 2008 at 11:45 UTC ( #687752=note: print w/replies, xml ) Need Help??


in reply to Calling different methods based on a CGI parameter

Simple, by using a dispatch table:

my %handlers = ( table1 => \&_upload_table1, table2 => \&_upload_table2, ); $tablename=cgi->param('tablename'); my $handler = $handlers{$tablename}; $handler->(args);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://687752]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2023-09-28 01:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?