What Is CGI.pm?

This section describes what is CGI.pm - a Perl module that helps you to process HTTP requests and prepare HTTP responses through the CGI (Common Gateway Interface) standard.

What Is CGI.pm? CGI.pm, developed by Lincoln D. Stein, is a Perl module that helps you to process HTTP requests and prepare HTTP responses through the CGI (Common Gateway Interface) standard.

The current version of CGI.pm included in Perl 5.18 support a large number of properties and methods, which can be divided into these categories:

1. Constructing Query Objects - Methods to construct query (CGI) object to represent HTTP requests.

2. Managing Parameters from Request - Methods to manage parameters provided in the HTTP request.

3. Retrieving Headers from Request - Methods to retrieve header line information from the HTTP request.

4. Retrieving Server information - Methods to retrieve environment information from the Web server.

5. Setting Headers to Response - Methods to create header lines ready to be printed to the HTTP response.

6. Building Response Content - Methods to build HTML elements ready to be printed to the HTTP response.

Last update: 2014.

Table of Contents

 About This Book

 Perl on Linux Systems

 ActivePerl on Windows Systems

 Data Types: Values and Variables

 Expressions, Operations and Simple Statements

 User Defined Subroutines

 Perl Built-in Debugger

 Name Spaces and Perl Module Files

 Symbolic (or Soft) References

 Hard References - Addresses of Memory Objects

 Objects (or References) and Classes (or Packages)

 Typeglob and Importing Identifiers from Other Packages

 String Built-in Functions and Performance

 File Handles and Data Input/Output

 Open Files in Binary Mode

 Open Directories and Read File Names

 File System Functions and Operations

 Converting Perl Script to Executable Binary

 Using DBM Database Files

 Using MySQL Database Server

 Socket Communication Over the Internet

 XML::Simple Module - XML Parser and Generator

 XML Communication Model

 SOAP::Lite - SOAP Server-Client Communication Module

 Perl Programs as IIS Server CGI Scripts

 CGI (Common Gateway Interface)

 XML-RPC - Remote Procedure Call with XML and HTTP

 RPC::XML - Perl Implementation of XML-RPC

 Integrating Perl with Apache Web Server

CGI.pm Module for Building Web Pages

What Is CGI.pm?

 Generating HTML Document with CGI.pm

 Retrieving Query Parameters and Headers

 Retrieving Environment and Script Information

 Redirecting Browser to a URI

 "Refresh" http-equiv Meta Tag

 What Is CGI::Cookie?

 Retrieving and Setting HTTP Cookies

 LWP::UserAgent and Web Site Testing

 References

 PDF Printing Version