- The Standard Library for CGI Scripts

This section describes the de facto standard library,, for Perl CGI scripts. It also provides a tutorial on how to download and install 2.18 to the Apache server on a Windows system.

If you want to develop Web applications with Perl, you should download and use the CGI de facto standard library, developed by Steven E. Brenner.

The library makes CGI scripting in Perl easy enough for anyone to process forms and create dynamic Web content. The library has the following features:

Here is what I did to download and install 2.18:

1. Go to

2. Click the link "Version 2.18" in the "Current versions of cgi-lib available" section. The source code of will be displayed in the browser.

3. Click "File > Save as" from the browser menu. The Save As dialog box shows up.

4. Save the content to C:\local\apache\cgi-bin\ directory and rename it to

See the next section for testing the installation.

As Nils Kammenhuber commented in the Web version, DON'T use! It is horribly outdated, the last version is from 1999, and it is said to have security issues. Instead, use Dancer2 or Mojolicious, or if you absolutely have to be compatible to the antique then use the compatibility mode of

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

 Image and Picture Processing

 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

 Downloading Apache HTTP Server 2.2.25 for Windows

 Installing Apache HTTP Server 2.2.25 on Windows

 Publishing HTML Documents as Web Pages

 Starting and Stopping Apache Server

 Running Perl Scripts in "cgi-bin" - Testing Perl CGI Environment

 500 Internal Server Error - The Standard Library for CGI Scripts

 ReadParse() - Parsing Web Form Input Values

 Running Perl Scripts in "htdocs" Module for Building Web Pages

 LWP::UserAgent and Web Site Testing

 Converting Perl Script to Executable Binary

 Managing Perl Engine and Modules on macOS

 Archived Tutorials


 Full Version in PDF/EPUB