Example CGI Scripts in Perl
showcgi.pl - small examples
showcgi.pl - Form input
Example of Encoding
Displaying a text file
Echoing Inputs
Script to display a gif image
Example of Redirection
Create list of files
Setting a cookie
Setting a second cookie
Libraries of free Perl Software
cgi-lib.pl
: a library of useful Perl routines
or see
CGI-lib, developed by Steven Brenner
CGI.pm
: Lincoln Stein's CGI.pm
echoin.pl
: echos a form's input
showcgi.pl
: prints all environment variables
Locations containing free Perl scripts and Software
The Perl Directory
CPAN (Comprehensive Perl Archive Network)
Matt's Script Archive
ActivePerl
A few examples of available CGI scripts.
Here are a few examples.
A program to send the contents of a form via an email message
To get the perl source code
click here
A program to produce graphs of your log files
A program to produce a counter for your page
A program to produce a clock for your page
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees