Date Published: 2002-08-28
A superb book written by two hard-core Perl advocates, succeeds in its stated mission to offer a complete demonstration of the use of Perl for CGI applications. Rather than simply describing how Perl excels at CGI apps, they show you -- with elegantly written examples for a wide variety of CGI applications.
A superb book written by two hard-core Perl advocates, succeeds in its stated
mission to offer a complete demonstration of the use of Perl for CGI applications.
Rather than simply describing how Perl excels at CGI apps, they show you --
with elegantly written examples for a wide variety of CGI applications. See
the table of contents below.
This book is not written for the absolute beginner. People who already have
at least a rudimentary knowledge of Perl, and some experience with CGI programming,
will get the most out of Writing CGI Applications with Perl.
One of my favorite features is the comprehensive line-by-line discussion of
the code provided. The authors leave no room for uncertainty -- they provide
sample code and then explain it in clear and concise terms. In one extreme example,
the following regex is completely demystified in only 2 paragraphs.
$raw =~ s!((ht|f)tps?://)([\w-]*)((\..[^\s]*)+)!
<a href="$1$3$4" target="external">$1$3$4</a>!g;
Using a unique and refreshing approach to Perl explication, the authors promote
the reader's clear understanding of the code without excessive verbosity. Some
code snippets are completely explained in only one sentence; others, like the
example above, can take 33 lines or more. The authors demonstrate a remarkable
ability to remain focused on the code at hand while avoiding the sidetracks
that plague many of the Perl writers today.
Compared to another popular work, Programming the Perl DBI, Writing CGI Applications
with Perl gets the reader creating and querying databases via the DBI module
much more quickly - without the in-depth theoretical discussion on SQL and relational
databases. I recall becoming somewhat frustrated with Programming the Perl DBI
because it took so long to weed through the gory details before getting to the
heart of the matter. Writing CGI Applications with Perl fits my preferred method
of study much more closely, without sacrificing content or comprehensiveness.
This is not to say that Programming the Perl DBI is an unsatisfactory book.
On the contrary, it is a very good source for theory, background, and (finally!)
implementation. If you want to hit the ground running with DBI (and the other
covered topics), Writing CGI Applications with Perl is, in my opinion, the better
Writing CGI Applications with Perl is an excellent book. Anyone involved - or
anyone who would like to be involved -- with programming CGI with Perl will
find it extraordinarily useful.
Table of Contents
- Perl, CGI, and This Book.
- What You Should Know.
- Using Your Environment.
- Introduction to Web Forms.
- Working with Cookies.
- Access Counters.
- Web Based File Uploading.
- Tracking Clicks.
- Using mod_perl.
- Web-Based E-mail.
- Introduction to DBI and Databases on the Web.
- Tied Variables.
- Embedding Perl in HTML with Mason.
- Document Management via the Web.
- Dynamically Manipulating Images.
- RSS and XML. (This
chapter is available in PDF format)
Appendix A: Server Codes.
Appendix B: Environment Variables.
Appendix C: POSIX::strftime() Formats.
Appendix D: General Public License.
Appendix E: Artistic License.
Appendix F: Perl Documentation.
Appendix G: ASCII Codes.
Appendix H: Special HTML Characters.