Developing CGI Scripts with CGI.pm

The core of any CGI script is the CGI.pm module. While you can write CGI scripts using raw Perl, or using various other CGI libraries out there, CGI.pm is available as part of the Perl distribution, is well-supported and robust, runs across platforms, and gives you just about any feature you might want as you work with CGI. Working without it will make your CGI-scripting life much harder.

In the preceding section, I showed you a really simple example of using CGI.pm. Let's explore the features of this module in more detail in this section, so you know the sorts of things you can do with it.

Using CGI.pm

To use CGI.pm in your Perl scripts, you import it like you do any module. CGI.pm has several import tags you ...

Get Sams Teach Yourself Perl in 21 Days, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.