Book review: Randal Schwartz’s Perls of Wisdom <i>by Randal L Schwartz</i>

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 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.

Pros

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.

Cons

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

Category: 
License: 

Comments

Author information

Martin Brown's picture

Biography

Martin “MC” Brown is a member of the documentation team at MySQL and freelance writer. He has worked with Microsoft as an Subject Matter Expert (SME), is a featured blogger for ComputerWorld, a founding member of AnswerSquad.com, Technical Director of Foodware.net and, and has written books on topics as diverse as Microsoft Certification, iMacs, and free software programming.

Most forwarded

Interview with Dave Mohyla, of DTIDATA

Dave Mohyla is the president and founder of dtidata.com, a hard drive recovery facility based in Tampa, Florida.

TM: Where are you based? What does your company do?
DTI Data recovery is based in South Pasadena, Florida which is a suburb of Tampa. We have been here for over 10 years. We operate a bio-metrically secured class 100 clean room where we perform hard drive recovery on all types of hard disks, from laptop hard drives to multi drive RAID systems.

Anybody up to writing good directory software?

Since the very beginning, directories (of any kind) have had a very central role in the internet. (I have recently grown fond of Free Web Directory. Even Slashdot can be considered a directory: a collection of great news and invaluable user-generated comments. As far as software is concerned, doing a quick search on Google about software directories will return the free (as in freedom) software directories like Savannah, SourceForge, Freshmeat and so on, followed by shareware and freeware sites such as FileBuzz, PCWin Download Center and All Freeware (great if you're looking for shareware and freeware, but definitely less comprehensive than their free-as-in-freedom counterparts).

Interview with Mark Shuttleworth

Mark Shuttleworth is the founder of Thawte, the first Certification Authority to sell public SSL certificates. After selling Thawte to Verisign, Mark moved on to training as an astronaut in Russia and visiting space. Once he got back he founded Ubuntu, the leading GNU/Linux distribution. He agreed on releasing a quick interview to Free Software Magazine.

Is better education the key to finding better software?

I read David Jonathon's article Anybody Up To Writing Good Directory Software? the other day, which got me thinking about software directories in general. As David mentioned, many of the software directories one finds when doing a quick google search are free as in beer, not as in freedom. But what interests me is the software directories that already exist, providing a combination of both free as in beer software, and open source software. Sites such as Freeware Downloads and Shareware Download don't advertise themselves as providing free as in liberty software, but each of them have a good selection of open source software available... if you know where to look.

Most emailed

Free Open Document label templates

If you’ve ever spent hours at work doing mailings, cursed your printer for printing outside the lines on your labels, or moaned “There has got to be a better way to do this,” here’s the solution you’ve been looking for. Working smarter, not harder! Worldlabel.com, a manufacture of labels offers Open Office / Libre Office labels templates for downloading in ODF format which will save you time, effort, and (if you want) make really cool-looking labels

Creating a user-centric site in Drupal

A little while ago, while talking in the #drupal mailing list, I showed my latest creation to one of the core developers there. His reaction was "Wow, I am always surprised what people use Drupal for". His surprise is somehow justified: I did create a site for a bunch of entertainers in Perth, a company set to use Drupal to take over the world with Entertainers.Biz.

Update: since writing this article, I have updated the system so that the whole booking process happens online. I will update the article accordingly!

So, why, why do people and companies develop free software?

More and more people are discovering free software. Many people only do so after weeks, or even months, of using it. I wonder, for example, how many Firefox users actually know how free Firefox really is—many of them realise that you can get it for free, but find it hard to believe that anybody can modify it and even redistribute it legally.

When the discovery is made, the first instinct is to ask: why do they do it? Programming is hard work. Even though most (if not all) programmers are driven by their higher-than-normal IQs and their amazing passion for solving problems, it’s still hard to understand why so many of them would donate so much of their time to creating something that they can’t really show off to anybody but their colleagues or geek friends.

Sure, anybody can buy laptops, and just program. No need to get a full-on lab or spend thousands of dollars in equipment. But... is that the full story?

Fun articles

Santa Claus - the most successful open source project

It dawned on me the other day, as I was shopping for the dozens of gifts it seems I have to buy every December, that Santa Claus is the most successful open source project in history. (Bridget @ Illiterarty would agree with that). Santa Claus is essentially a marketing development that is embodied by everyone who stuffs a sock, gives a gift, hosts a dinner or wishes Merry Christmas over the holiday season.

Most emailed

Editorial

When I first started thinking about Free Software Magazine, I was feeling enthusiastic about the dream. I had Dave, Gianluca, and Alan willing to help me, I had established members of the free software community willing to help me out, I had writers volunteering their time and energy for free, and I had a generous offer from OpenHosting for servers, all before I'd proved myself. There was a sense of excitement in the air, and I thought maybe, just maybe, I could make this work.

Free Software Magazine uses Apollo project management software and CRM for its everyday activities!