CGI (Common Gateway Interface) scripts are the way one has to
interface a Web form and some script, say, an IDL one.
It is not trivial to write such a CGI script from scratch.
I have been using the
cgi-lib.pl
Perl library.
You can view the source code for my major CGI script
script1.cgi.