Chuck Crisler wrote:
> I need to execute a Perl script on the server from my HTML. I
> found examples of running a script in the browser and I know how to
> configure Apache. I just don't know how to invoke a server script. I
> need the answer, but it would really be helpful to also know where to
> look for this information. :-)
> One more piece of info. I am not using a form. I have an example from
> Apache for that.

If the script is fast and small, or if you're not concerned about
loading down Apache, you could write a Perl/CGI wrapper script that
calls your script via system(), backticks, etc., and displays a simple
done/ error page.


If the script is slow, heavy, or otherwise needs to run independent of
Apache, you could turn your script into a server and write a Perl/CGI
control panel application.


Use the CGI.pm module -- it will take care of forms, parameters, GET vs.
POST, etc..  If your CGI stuff starts getting complicated, a web
framework may help (Mason, CGI::Application, Catalyst, etc.).


As always, beware of security issues.


The Perl Cookbook, the CGI.pm book, and/or CGI Programming with Perl
would all be helpful.


HTH,

David



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to