Summary

Not everything to do with Perl has to involve long and involved scripts with lots of subroutines. Sometimes the most useful things in Perl can be done using modules with a little glue code to get the result you want. CGI is a terrific example of this; the CGI.pm module covers up most of the gritty parts of CGI scripting and makes it easy to get the values from a form or other CGI submission and return an HTML file as the result.

Today you learned something about using Perl for CGI, including how CGI works from the browser to the server to the script and back again; how CGI.pm can be imported and used in your script, and how to use its various features to make your life with CGI more pleasant. We also explored a couple of CGI examples: ...

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.