A Look at CGI.pm
-
My personal favorite, but that is just me.
-
Treat it just like a JavaScript object. Its methods make Perl scripting
much easier.
-
To start, enter these on the top of your Perl script, after the shebang
line but before you start writing HTML:
# include the CGI.pm library
use CGI;
# Create a CGI object.
$query = new CGI;
-
And, you are ready to go.
-
To get the value entered from a form, using CGI.pm,
$query->param('firstname');
(Use it like this to print it out once, or assign it to a variable
for quicker access.)
More basic CGI.pm methods
Home