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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.