You can write any arbitrary program and have the server execute it.
You put your program in cgi-bin
[] Installing a CGI program at Monash
The client sends a request to run a program, and it gets run, generates any STDOUT it wants and that is sent pretty much straight back to the client.
It's just a standard perl program printing things to std out.
The browser packages up form data and posts it over to the server. It will send those as name values into that perl program.
use CGI qw(param);
HTML is a stateless protocol. You can use hidden parameters to make it as if it does have state with the string going back and forth. The other way is to use cookies, which is more secure. So you don't do this if you want to build a secure system.
CGI security is very important
What you're allowing is for someone to log in and run as you!
So you should always check values for correctness.
What about asynchronous javascript: That's server side processing.
0 Responses to “CGI and Perl”
Leave a Reply