Can anyone either give me a hint on how to do this, or if there's a better way?
CGI::Application can map a cgi parameter to a perl subroutine. It even takes care of setting up http headers for you. Given the type of question you are asking, it will take care of countless issues you would otherwise encounter while trying to develop web apps:
#!/usr/bin/perl use warnings; use strict; MyApp->new->run; package MyApp; use base qw(CGI::Application); use CGI::Application::Plugin::AutoRunmode; sub mySub : Runmode { return "Hello from mySub\n"; }
Here is what happens when you run it from a terminal:
$ ./runmode.cgi rm=mySub Content-Type: text/html; charset=ISO-8859-1 Hello from mySub
trwww
In reply to Re: call subroutine from cgi form
by trwww
in thread call subroutine from cgi form
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |