May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

Best books on CGI Scripting


Selected Computer Books

Classic Computer Books

Apache Web Server



Best books for learning HTML

LAMP Bookshelf Best Perl Books for System Administrators CD Bookshelf LAMP Stack as new program development paradigm Best Red Hat Books Humor Etc

CGI is a very flexible and powerful protocol, and it scales much more that most WEB developers assume.  CGI may be not that fancy technology, but it's simple and you can do almost anything in it.

For many applications is simpler and no less efficient that using PHP or Java server pages.

Unfortunately CGI scripting was de-emphasized recent years in favor of new technologies.

The most common tool for writing CGI scripts is Perl, therefore most CGI scripts you can find on the WEB are written in this language.

Essentially, all web applications do pretty much the same things:

  1. Provide a Query Interface - Web Applications provide users with an interface for entering data. The data they enter is usually called a "query" or a "request" because the user-defined data is used to dynamically query or make a request from some service on the web server machine (searching a database, ordering a book, requesting a file).
  2. Transmit User-Defined Query - Once collected, the user-data is sent to a web server
  3. Perform Server Side Processing - The web server processes the user-data using some sort of "middleware".
  4. Massage Data - Processing almost always involves playing with data on the server. The user-defined request specifies how the data should be played with.
  5. Transmit Query Results - The processed data is now returned to the client.
  6. Perform Client Side Processing - Finally, the returned data is displayed to the user. Display might be as simple as interpreting HTML, or as complex as performing calculations, sorting, or other manipulations of the data.

Books about SGE are usually old and rather cheap (most used copies are less then a dollar), but that does not mean that there are no good books among them or that they all are qual. The latter is definitely not true.

Among best advanced books I can mention Web Scripts With Cgi Perl. It contain a set of usable modules studying of which really help you to write your own SGE applications.

As for introductory CGI books Writing CGI Applications with Perl  stands out (it teaches CGI not Perl, so you should already know Perl to benefit from it).

Teach Yourself Cgi Programming With Perl 5 in a Week  is not bad

Top Visited
Past week
Past month


Old News ;-)

[Sep 17, 2002] Sams Teach Yourself CGI in 24 Hours by Rafe Colburn

Paperback: 544 pages
Publisher: Sams; 2 edition (September 17, 2002)
Language: English
ISBN-10: 0672324040
ISBN-13: 978-0672324048
Product Dimensions: 7.3 x 1.1 x 9.1 inches
Shipping Weight: 1.9 pounds

A customer, on November 4, 2001

I am impressed

The content of the book impressed me. Prior to reading the book, I had taught myself Perl programming, and had learned the basics of forms processing. I didn't understand some of CGI jargon I came across in more than one Perl book that glossed over CGI in a single chapter somewhere toward the back of the book. But this book on CGI programming gave me all the information I needed to feel like a CGI pro, someone who could keep his cool in any discussion where "CGI" was spoken.

Some of the information in this book is worth writing down, so you can remember the clear understanding that reading the book gave you, and so you can regurgitate that understanding to other people later, say after months of no complex CGI programming. This book offers enough explanation to make you see things from a webmaster's perspective, but also a UNIX programmer's perspective. Without more than a basic idea of how the UNIX command-line works.

I will confess that if you don't know Perl, I don't think you'd have the same reaction I did. But CGI books shouldn't have to teach you Perl, and at the same time, Perl is THE language for CGI programming.

The "brief" coverage that this book gives to other CGI languages is not meant to underplay their relative importance, but rather to give Perl the attention that it's due. Also, realize that PHP is not a CGI language, and I wouldn't classify JSP as one, either, so you definitely won't find mention of them in Rafe's book as anything other than alternatives to CGI.

So learn some Perl, say from the new "Beginning Perl" book from OReilly, and then get Rafe's book, to learn CGI. "Teach Yourself CGI in 24 Hours" is worth buying and studying.

[Dec 1 1996] Teach Yourself Cgi Programming With Perl 5 in a Week by Eric Herrmann

Paperback: 590 pages
Publisher: Sams Publishing; 2nd edition (December 1996)
Language: English
ISBN-10: 1575211963
ISBN-13: 978-1575211961
Product Dimensions: 1.8 x 7.5 x 9.2 inches

A Customer on September 13, 1996

Year's Best CGI Tutorial/Reference Technical Guide.

Recently, after examining a number of CGI/Perl type books, I purchased a wonderful instructional book titled,"Teach Yourself CGI Programming with Perl in a Week" by Eric Herrman. I had no prior experience with CGI or Perl, but had gained an interest in the subject after talking to several friends at my work place. After reading this book, I have written several CGI scripts that are currently being used in my department.

This book is organized into seven lessons that correspond to the seven days of the week. I found day one (the introduction) to be a little technical and over my head, but the author explained that this information would be covered in detail in the Chapters to follow. Once I made it to day two I was on the road to becoming a CGI script programmer. The Author makes excellent use of visuals andworking programs to explain how Web Pages interact with CGI Scripts and then back to the Web.

The author explained that he chose Perl as the language for writing the CGI scripts because it works well with UNIX environments, but the scripts could be written in a number of languages. Upon completion of this book I felt very comfortable with Perl as a primary programming language and would highly suggest this book to anyone that is interested in programming with the Web.

My only suggestion to anyone that is considering to purchase this book is that unless they have a lot of spare time, be prepared to spend more than one week to complete this book. I read this book in my leisure after work and I estimate that it took me two weeks to complete the reading and feel confident in my knowledge.

[Oct 1, 1996] CGI Programming Unleashed by Daniel J. Berlin, Shuman Ghosemajumder, Kenneth J. Hunt

A customer on March 21, 1998

A good book, but not enough actual source code.

I was very happy to find the extra book mounted on the CD, Perl 5 in 21 days, but the actual book itself would describe general concepts without actually giving enough concrete examples of how to do it. This book is definitely intended for those who are already fairly experienced with programming in Perl. Also, the author could stand to be a little less dry and his code should be more readable (indentation and white space).

A customer, on June 20, 1997

Learn CGI for Perl programmer

It gives good overview of CGI and many examples. It explains basic operation of CGI in the beginning, then illustrates numerous application afterwards.

However, the author seems to have a strong favor for Perl. There are very few C, C++, and Java examples available. After reading, C/C++ programmer will feel like to study ISAPI or NSAPI that can replace CGI. The source code provided in this book is written for UNIX based web server NOT for Windows NT (IIS) Web server.
Overall, it is designed for novice and intermediate level reader.

Html 3.2 and Cgi Unleashed Professional Reference Edition by John December, Mark Ginsburg

  • Hardcover: 1321 pages
  • Publisher: Sams Publishing (October 1996)
  • Language: English
  • ISBN-10: 1575211777
  • ISBN-13: 978-1575211770
  • Product Dimensions: 2.8 x 7.8 x 9.8 inches

By A Customer on July 22, 1997

A good reference

This is probably one of the best reference manuals on HTML on the market. If you have no experience with HTML or CGI, however, this book won't be much help. If you are a new user get Teach Yourself HTML 3.2 in a week by Laura Lemay. For the CGI, start with Teach Yourself Perl in 21 days by David Till. These will get you going.

As a reference, this book covers every aspect of HTML that I have ever come across. Whenever I need to look up a tag, the book gives good examples of usage and purpose. One of the problems that I found with the CGI section of the book is that there are errors in some the CGI examples. Most of these are updated on the book's web page, but it was still frustrating.

Overall, if you know what you are doing and just need something to keep as a reference manual, this is the book for you. Otherwise, get something geared more towards beginners.

Running Weblogs with Slash

Slash is the open source software that implements Web sites known as Weblogs. This book provides an overview of Slash, then takes you step by step through the process of installing the software, editing stories, managing topics, customizing templates, and much more. If you're a content manager or a system administrator, or you just want to know how to run your own online community newspaper, this book shows you how to use Slash to get your Weblog site up and running.

Sample Chapter 4, Editing and Updating Stories, is available online.

Open Source Linux Web Programming

Christopher A. Jones, Drew Batchelor / Paperback / Published 2000

Average Customer Review: 5 out of 5 stars

Programming the Perl Dbi : Database Programming for Perl and Cgi

SG24-5415 1999-01-29 Redpiece
Getting Started with Data Warehouse and Business Intelligence, SG24-5415-00

Perl and Cgi for the World Wide Web : Visual Quickstart Guide by Elizabeth Castro

**** A good into book. somewhat superficial

Paperback / Published 1998

Average Customer Review: *****

CGI Programming 101

Jacqueline D. Hamilton / Paperback / Published 2000
Our Price: $17.47 ~ You Save: $7.48 (30%)
Average Customer Review: 5 out of 5 stars

See online version CGI Programming 101 - Learn CGI Today!

Official Guide to Programming With Cgi.Pm by Lincoln Stein

*** I am not sure that one should use and I do not like its design.

Paperback / Published 1998

Average Customer Review: ****

From the author of Read an excerpt from this title. He is also the author of Web Security : A Step-By-Step Reference Guide

The author, Lincoln Stein <[email protected]> , June 19, 1998
Create Web CGI scripts in Perl with simplicity and elegance
When I first discovered the power of Perl for writing Web CGI scripts, I was on the top of the world. "I can do anything!" I thought. A few weeks later the gloss had worn away a bit as I found myself in the vexing position of rewriting the same tedious pieces of code multiple times, and, worse, making the same mistakes repeatedly. So I did what programmers have always done: I wrote a small subroutine library to make my life easier. I called it "" This library takes care of all the details of parsing fill-out forms, producing syntactically correct HTML, and creating the HTTP header. A complete interactive page can be as short and sweet as this one:

use CGI ':standard';

print header,
start_html(-title=>'Short and Sweet'),
h1("'Tis a Gift to be Simple"),
"Type your name:",textfield(-name=>'Name'),

print "You entered ",param('Name') if param();

print end_html;

Over a long period of time, this library grew and became more sophisticated. I added support for frames, for cookies, for JavaScripting, and for such esoterica as server push. And as it grew, more and more people discovered it and began to use it for their own CGI scripting. When Perl 5.004 was released, it was adopted as the standard library for Perl CGI scripting.

With this book, I share with you all the secrets of, showing you how to use it to create elegant and sophisticated applications of your own, and how to extend and customize the library for your own purposes.

Customer Comments
Average Customer Review: **** Number of Reviews: 4

A reader from Richmond, Virginia , August 30, 1999 ***
Information is invaluable but organization needs work
This is an invaluable book for using an invaluable library module (if you do CGI coding). There is absolutely no substitute for However, this book is very frustrating to use because the Reference Guide section is organized into different weird categories instead of just listing all the functions in in alphabetical order (like in Perl books, for example). Therefore the reader has to try to figure out what category a function in the module belongs in in order to look it up. Very very aggravating! In fact I trained a group of developers in using and many of them avoided using it because it takes so long to find what you're looking for in the reference section of the book. I am hoping for a new edition of the book SOON with this problem corrected. The material is invaluable, but I have to give three stars because of poor organization.

[email protected] from San Francisco , January 14, 1999 *****
A Must Buy
Examples solve real life programming needs. It is a real time and life saver. (note to publisher:Print it darker. It is hard to tell difference between commas and periods.

Joseph N. Hall ([email protected]) from Chandler, Arizona , September 30, 1998 ****+
Excellent text; questionable typography
I've enjoyed this latest book of Lincoln's, and recommend it highly. This is an interesting book with many good examples. I am happily using it as a text in my Programming the World Wide Web classes. This is one of very, very few books on CGI programming that use fluent Perl (Perl 5 constructs in particular) *and* up-to-date language features (, obviously). The only drawback of the book, and the only reason I didn't give it 5 stars, is that I think the typography is lousy. In particular, the font for the code samples is too light, and the excessive leading in general makes the book harder to read. The book has its share of first printing typos, but then again, mine had them too, so I can hardly complain about that. :-) Good work, Lincoln!

Larry Hunter ([email protected]) from Austin TX , June 18, 1998 *****
A potential winner with a few first-edition problems.
This book will be an absolute necessity for CGI programmers writing in Perl. It's a description of a must-use tool by the tool's creator. It goes well beyond the online and POD documentation for The example code snippets and programs are well chosen. There are a few problems: the organization of the reference section is confusing, and the descriptions of table(), Tr(), and td() don't explain how to enter attributes. (But the table examples show how to do that, so it's not much of a problem.) Summary: if you write CGI in Perl, get this book and use it.

Cgi Programming With Perl

Shishir Gundavavum, Shishir Gundavaram / Paperback / Published 2000

Teach Yourself Cgi Programming in a Week

Rafe Colburn, Krish Menon / Paperback / Published 1998
Average Customer Review: 3.5 out of 5 stars

[email protected] from Framont, California. U.S.A , January 15, 1999 5 out of 5 stars

A best book for CGI beginner

I have bought 5 CGI books, only this one does teach me something from the beginning. By reading through the first chapter, I fully understand the structure of a site, what is the document root, why index page in the /usr/local/http/htdocs directory is automaticlly loaded if is used, as well as why cgi-bin is treated as in the same directory under the document root as your html document eventhough the cgi-bin is one level higher than htdocs, etc, ... These are all the questions I have in my mind since I started to learn CGI, this book enlightened me starting in the first chapter! (Certainly not only one chapter can do all). No other books take a approach as this one to teach you from the very beginning, which is very crucial to any one who is new to CGI I believe. This is a book for any one who wants to learn CGI from the very beginning. But I think if you have some html and unix knowledge, it would be much easier for you to quickly learn CGI by reading this book. I have one year html experience and know some basic unix and perl, I feel very comfortable reading through this book and finished with it just in a week. If you are looking for some advanced CGI, maybe O'Reilly's "Programming in CGI" will do much better for you.

Cgi for Commerce : A Complete Web-Based Selling Solution

Gunther Birznieks, et al / Paperback / Published 1997
Amazon price: $31.96 ~ You Save: $7.

The Cgi/Perl Cookbook by Craig Patchett, et al

Pretty weak treatment of the subject...

A reader from California , June 5, 1999

The code in this book is terrible
I friend of mine has this book, and I thought I'd take a look at a couple of the example they give, becaue I am trying to write a search engine. Their code, while basically funcional, has little real worth... the code is amateurish...

A reader from Arlington, Virginia , May 28, 1999

Lots of code, some buggy and no real CGI security usage.

What I really needed was a CGI/PERL/Security book. What I got was This Book, and it went back to the store the next day. I didn't like that the first line of code I saw lacked the -T (taint) flag, and it must be a 5.003 bug or me, but I could not use PUSH to add my library to @INC, but instead had to USE it. www.booksonline (SCBC) is offering this book for $15, and that is about what its worth.

Visual Developer Web Commerce Programming With Visual C++

Don Gaspar / Paperback / Published 1997
Amazon price: $31.99 ~ You Save: $8.00 (20%)

A reader from San Jose, CA , August 23, 1998
The CGI Programming was very helpful.
This book should be labeled CGI/ISAPI programming since the examples show how to do this in ample detail with a Web server. The usage of STL was very helpful, and is obviously written for advanced programmers.

A reader from California, US , August 23, 1998
Excellent technical book for CGI and ISAPI programming.
The examples were clear and helpful, the STL focus showed me some things I had never done before with the stream iterators. This is the only worthwhile book that shows how to do CGI programming in C++! The ISAPI and ODBC samples helped me enable retail merchandise from my web site within a few weeks. Combined with the credit card validation examples in C++ makes this recommended.

[Sep 1, 1996] Instant Web Scripts With Cgi Perl by Selena Sol,

**** [Advanced] This is a rare and great book. Scripts actually work...
  • Paperback: 809 pages
  • Publisher: M & T Books (September 1996)
  • Language: English
  • ISBN-10: 1558514902
  • ISBN-13: 978-1558514904
  • Product Dimensions: 2 x 7 x 9.2 inches
  • Shipping Weight: 3 pounds

Selena Sol, et al / Paperback / Published 1996

This book provides dozens of useful, professionally written scripts that Web professionals can instantly use on their pages and customize to their individual needs. Using the scripts on the CD-ROM and detailed explanations in the book, readers will be able to manage database applications, automatically generate HTML code from their pages, and manage interactive Web Chats.

[email protected] on April 26, 1998

Great for intermediate & above users

I think this book is more informational than practical. Although I've been able to successfully customize some of the CGI scripts, I've had a bear of a time relating to the procedures and found no help what so ever in the error or troubleshooting department. All in all the scripts in this book are extremely powerfull, just make sure you make time for deciphering!

A Customer on March 25, 1997

Clear, practical and immediately usefull

If you are looking to add "Professional" functions and features to your web site, this book is a must have. The introductory section tells you everything you need to know about installing, debugging and modifying these perl scripts.

Includes every conceivable function the professional web sites use such as search engines, advertising banners, chat, shopping carts and much more.

Most scripts need no modification to be immediately used. If you do choose to modify a script, the code is clearly commented and each chapter breaks down the functions in the program so that the reader can easily modify the code.

This book does require knowledge of server software (Unix, or windows NT) sufficient to install the scripts properly. In addition, knowledge of Perl is required to modify the scripts. However, this reviewer had little knowledge of Perl and was able to successfully modify and use several scripts with minimal effort, and even learned a lot about Perl along the way!

Even if you are a Perl expert, why re-invent the wheel? Get this book and jumpstart your web site!

Recommended Links

Google matched content

Softpanorama Recommended

Top articles


Top articles





Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy


War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes


Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law


Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Haterís Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D

Copyright © 1996-2021 by Softpanorama Society. was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to to buy a cup of coffee for authors of this site


The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Last modified: March, 12, 2019