September 2002
Intermediate to advanced
544 pages
13h 6m
English
The most common usage of CGI.pm is to decode form data. In fact, in many CGI programs, that’s all it’s used for. As soon as you import the CGI.pm module, all the input from the form is automatically translated and made accessible through the param method.
In most cases, the translation from form field to Perl variable is obvious. A group of radio buttons called favorite_color is accessible through param('favorite_color'). A text input field called name is accessible through param('name'). There are three special cases that merit individual discussion when it comes to translating form input into a Perl data structure. These three cases are image input fields for which names are specified, select lists that allow ...
Read now
Unlock full access