Menu Home End users Hacking Humour Interviews Opinons Reviews All articles Issues Books
Free Software magazine
Martin Brown [reviews]

Book review: Randal Schwartz’s Perls of Wisdom by Randal L Schwartz

Ask for some key figures in the world of Perl and it wont be long before the name Randal L Schwartz appears. Randal has, at one time or another, been a trainer of Perl, the Pumpking (responsible for managing the development of Perl), as well as a prolific writer and speaker on Perl techniques and materials. In Perls of Wisdom (Apress) he gathers together many of his talks and articles into a single book, expanding, correcting and extending them as necessary.

The book’s cover

Randal knows Perl so well there are some absolute gems here on how to solve specific problems using techniques and algorithms that are far from obvious, but just as effective

The contents

There are only five chapters in this book (spread over 343 pages), but each chapter is made up of a number of specific examples. In each case, the example is based on an article, column or email/Usenet post that Randal has used to cover a specific issue. You get coverage of the problem, a detailed example (including line-numbered source code) and a step-by-step guide of the solution and how it works. These are not snippets of potential code. Nor are they just an explanation of the code itself, you get full details on the methodologies used and how they can be adapted or changed to best suit your own needs and applications.

Because each example is an article that has previously been published, Randal also takes the opportunity to provide some commentary on how he might have done things differently and even provides a few corrections and updates in places. Having been previously published, he’s also had the opportunity to debug the examples and the code so you end up with some very clear and coherent samples.

The content is varied. The five chapter headings: Advanced Perl Techniques, Test Searching and Editing, HTML and XML Processing, CGI Programming and Webmaster Tools, don’t remotely give the content the credit it deserves. There are some amazing samples here, from the basics of object programming right up to load balancing scripts and web cookie tools.

There are examples covered are so good that I think they should be required reading for any Perl programmer. The aforementioned object introduction for example would go a long way to helping many Perl programmers make better use of the class system built into Perl. “Discovering Incomprehensible Documentation” should be an application fitted to the output of every man page generated by Perl programmers, although I sadly doubt it will address all of the issues we regularly experience when trying to understand the documentation included with certain modules I wont mention.

Other examples provide more useful tools that we should all be exploiting. There’s an automatic meta-indexing tool (for web pages) that could be the key part of many website searching tools and the calendar sample could the form the basis of an excellent web-based diary application.

All of these examples are provided with such finesse and style that it can be difficult to appreciate that you are actually reading a guide to writing code for one of the most popular, easy to use and on so many occasions confusing programming languages available.

Who’s this book for?

Perl programmers, pure and simple. If you program in Perl, read this book. I don’t care what you think you already know, read it anyway. Even if you could have guessed at Randal’s solution, his prose and relaxed style is incredible easy and enjoyable to read.

If I were to recommend the book to any other group of people it would be writers, just to give them an example of how to write examples and code in a way that makes it useful and easy to understand.


Quite possibly this is the best condensation of real-world Perl knowledge available in a single book. It far exceeds the information and examples provided in any cookbook, or even the titles from O’Reilly in terms of actually addressing common user needs and problems. Because the book is based, mostly, on real reader requests and problems that Randal himself has faced it goes much further than the usual example-led approaches.

Furthermore, because Randal knows Perl so well, there are some absolute gems here on how to solve specific problems using techniques and algorithms that are far from obvious, but just as effective. The book not only answers your queries, it also shows you elements of Perl that you’d forgotten, or simply didn’t realize existed, and in such a way that it’s easy to see how you could adapt it.


The content ends far too quickly. I eagerly await “More Perls of Wisdom”.

Title Perls of Wisdom
Author Randal L Schwartz
Publisher Apress
ISBN 1-59059-323-5
Year 2005
Pages 348
CD included No
Mark 10

In short


Verbatim copying and distribution of this entire article are permitted worldwide, without royalty, in any medium, provided this notice is preserved.