CGI Programming with Perl: Creating Dynamic Web Pages Second Edition
| Scott Guelich (Author) Find all the books, read about the author, and more. See search results for this author |
| Shishir Gundavaram (Author) Find all the books, read about the author, and more. See search results for this author |
| Gunther Birznieks (Author) Find all the books, read about the author, and more. See search results for this author |
Use the Amazon App to scan ISBNs and compare prices.
Programming on the Web today can involve any of several technologies, but the Common Gateway Interface (CGI) has held its ground as the most mature method--and one of the most powerful ones--of providing dynamic web content. CGI is a generic interface for calling external programs to crunch numbers, query databases, generate customized graphics, or perform any other server-side task. There was a time when CGI was the only game in town for server-side programming; today, although we have ASP, PHP, Java servlets, and ColdFusion (among others), CGI continues to be the most ubiquitous server-side technology on the Web.CGI programs can be written in any programming language, but Perl is by far the most popular language for CGI. Initially developed over a decade ago for text processing, Perl has evolved into a powerful object-oriented language, while retaining its simplicity of use. CGI programmers appreciate Perl's text manipulation features and its CGI.pm module, which gives a well-integrated object-oriented interface to practically all CGI-related tasks. While other languages might be more elegant or more efficient, Perl is still considered the primary language for CGI.CGI Programming with Perl, Second Edition, offers a comprehensive explanation of using CGI to serve dynamic web content. Based on the best-selling CGI Programming on the World Wide Web, this edition has been completely rewritten to demonstrate current techniques available with the CGI.pm module and the latest versions of Perl. The book starts at the beginning, by explaining how CGI works, and then moves swiftly into the subtle details of developing CGI programs.Topics include:
- Incorporating JavaScript for form validation
- Controlling browser caching
- Making CGI scripts secure in Perl
- Working with databases
- Creating simple search engines
- Maintaining state between multiple sessions
- Generating graphics dynamically
- Improving performance of your CGI scripts
Frequently bought together

- +
Customers who viewed this item also viewed
Editorial Reviews
Amazon.com Review
And yet not. It is an ambiguous blessing that the original CGI persists, adhering to the underside of Web service by the duct tape that is Perl. This point is not missed by Guelich, Gundavaram, and Birznieks, whose advocacy of CGI is both bolstered by the growing applications module base of Perl and tempered by their awareness of CGI's structural limitations. Both new and returning readers of CGI Programming with Perl should browse the last chapter first in order to appreciate the proposed solutions to CGI's greatest sin: its impractical slowness in a world of a million-hits-per-day Web service. The chapter describes CGI-compatible FastCGI and mod_perl technologies that circumvent the process-spawning slowness of the simple CGI. Advanced users might want to skip directly to O'Reilly's fine mod_perl tome, Writing Apache Modules with Perl and C, by Lincoln Stein and Doug MacEachern.
The authors' second pass at CGI pedagogy is a lucid, honest, and expanded account that develops functionality of dynamic Web pages in a rational progression--from HTML client-server and CGI syntax basics to general input/output, forms, e-mail, graphics, and simple database applications, including maintaining client state and data persistence under the otherwise stateless HTTP protocol. The authors offer synopses of cookies, JavaScripting, server security, and XML, all of which are described in detail in other books.
Whether or not neoclassical CGI is fast enough for your purposes--perhaps for guarded intranets--bear in mind that CGI is the standard to which every other Web server has had to respond. The second edition of CGI Programming with Perl is still the best introduction to the classics. --Peter Leopold
About the Author
Scott Guelich graduated from Oberlin College in 1993 with a philosophy degree and decided to "only take a few years off" before continuing with graduate school. Unable to find any listing for "Philosopher Wanted" in the classifieds, and having done some programming while growing up, he quickly found himself working with computers. He discovered the Internet the following year and Perl the year after that. Scott has been a web developer for the past few years and currently contracts in the San Francisco Bay Area. He enjoys taijiquan, mountain biking, wind surfing, skiing, and anything that gets him outside and closer to nature. Despite the hours he spends working online, Scott is actually a closet Luddite who doesn't own a television, hasn't bought a cell phone, and still intends to make it to graduate school . . . some day.
Shishir Gundavaram graduated from Boston University with a BS in Biomedical Engineering in May of 1995. For his undergraduate thesis, he developed a Windows application for the Motor Unit Lab of the NeuroMuscular Research Center that allowed researchers to acquire and analyze muscle force output from patients to indirectly observe the electrical activity of muscles. He was the sole author of CGI Programming on the World Wide Web, published by O'Reilly & Associates, Inc., in 1996.
Gunther Birznieks is currently the chief technology officer for eXtropia.com, best known for its open source web programming archives and online tutorials in a variety of subjects related to web programming (Perl, CGI, Java). Before this, Gunther did web programming and infrastructure for the Human Genome Project. Most recently, he was an associate director at Barclays Capital where he had been the global head of web engineering.
Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Product details
- Publisher : O'Reilly Media; Second edition (July 9, 2000)
- Language : English
- Paperback : 472 pages
- ISBN-10 : 1565924193
- ISBN-13 : 978-1565924192
- Item Weight : 1.65 pounds
- Dimensions : 7 x 1.12 x 9.19 inches
- Best Sellers Rank: #2,471,455 in Books (See Top 100 in Books)
- #133 in Perl Programming
- #1,196 in JavaScript Programming (Books)
- #1,957 in Computer Networking (Books)
- Customer Reviews:
About the authors

Discover more of the author’s books, see similar authors, read author blogs and more

Discover more of the author’s books, see similar authors, read author blogs and more
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonTop reviews from the United States
There was a problem filtering reviews right now. Please try again later.
The book is closer to a classroom textbook than an at home/work guide. The programming examples moved from trivial to complex and I could have used a little classroom help with some of the advanced practices. I'm very sure this will be a long-time reference text and referred to over & over again.
Like just about every available text on Perl and/or CGI today the references are a bit dated. Discussions about Windows NT and HTML 3 are a little bit out of date, although the concepts discussed are still valid. Perl is referenced at the "soon to be released" 5.05 version - and that too is a bit old. I have not seen anything on the market as of early 2014 that is more up to date.
I'd call this a very useful text, written at the intermediate to advanced level. It covers a lot of ground, going into discussions of JavaScript, graphic formats, database structures, and other important side-issues. Even for those experienced in working with other languages the section on "Guidelines for Better CGI applications" is a must-read. One of the better reviews of good programming practices I've seen.
Chapter 1, 2 and 3 give some history of the WWW and CGI. Also provide a smaple CGI application for getting started. I think chapter 2, "Hypertext Transfer Protocol" was pretty informative, and I ejoyed it a lot.
Chapter 4, "Forms and CGI" go over some form anatomy and elementary ways of encoding and decoding form input, which you might find usefull.
Chapter 5 is entirely dedicated to CGI.pm and it's application. I still think CGI.pm's documentation available online (or with your Perl distribution) does way better job than this one chapter.
Chapter 6, "HTML Templates" gives some nice examples of HTML::Template and Embperl usage. They spend good space on these, but only about 3 pages to cover Mason. Of course, the chapter can't take you too far without the original documentations of those mentioned libraries which are available online.
Chapter 7, as I mentioned was dedicated to JavaScript and JS validation. I think they were not supposed to spend so much time on JavaScript. For this one, go get JavaScript Bible, 4th edition by Danny Goodman.
Chapter 8, Security covers the security guidelines already available online as W3C's security FAQ by L. Stein and John Stewart.
Chapter 9, "Sending Email" was probably my favorite. It covers 'sendmai', mailx and mail and procmail. Spends good 18 pages on the topic and shows an examile that uses Mail::Mailer
Chapter 11, Maintaining State, was really poor. There's nothing much to learn in that chapter. For more profesional session management examples, I suggest you "MySQL and Perl for the Web" by Paul DeBois and Apache::Session manual available online.
Chapter 12, "Searching the web" give some advanced examples of web searching. The example of Inverted Index Search using DB_File was my favorite.
Chapter 13, "Creating Graphics on the fly" give some examples of dynamic graphic generation using GD, Image::Magick and GD::Graph. I could give this chapter hmmm... 3 stars :)
Chapter 14, "Middleware and XML" was the one I just skipped over.
The last 3 chapters of the book are dedicated to debugging, coding with style and eficiency with mod_perl and FastCGI.
For debugging and style, I recommend "Programming perl 3rd edition".
Overall, i benefitted from the book a lot as it implies from my review. But still wanna save my 5 stars for the 3rd edition :)
I am in the process of designing and implementing a web site that needs CGI programming. I had never done CGI programming before and didn't know what CGI packages and approaches I wanted to use. This book was useful to me because it surveyed a wide variety of topics and approaches, briefly but in enough depth to be useful for professional website programming. Basically, every Section in every Chapter addresses a major new topic in depth, covering a surprising amount of ground for such a small book. By skimming each Section, I was able to quickly orient myself and determine if the topic was applicable to my website. If not, I didn't waste any more time on it. If so, I read the section very carefully. Because each topic only gets a few pages (even though many of them could easily have an entire book devoted to them), the writing is very dense and makes strong demands on the reader. This book is not suitable for the reader who wants a lot of hand-holding. Still, enough material is there that I rarely needed to consult outside documentation.
For example, the chapter on HTML templates covers a wide variety of approaches for embedding CGI output in HTML, carefully listing the strengths and weaknesses of each in both text and a summary chart. I had had initially thought that I would be able to use CGI.pm and Server-Side Includes to implement part of my site. The book's concise discussion of the limitations of SSI quickly made it clear I needed something more powerful. Reading further in the chapter, I found that the HTML::Template package had everything I needed. In only 8 pages on HTML::Template, I was able to master the package without reading any outside documentation. However, the section on HTML::Template was very densely written so that I had to read it very carefully.
Top reviews from other countries
P.S. I have seen some complaints about the number of errata. These have not bothered me in the slightest. Just get the errata pages from O'Reilly and print them out.
However the book does provide an excellent overview of cgi and the examples appear to cover all aspects of using Perl/cgi for web design. Although there is no mention of AJAX, javascript is discussed with examples given.



