As regular readers of this blog know, I’m just getting acquainted with Perl, which is to say that I started programming in Perl in the early ’90s but as an occasional thing. Only recently, with my renewed interest in scraping Webpages and using Web APIs have I really started to get my hands dirty with Perl scripts more than a line or two long.

Therefore, I was particularly pleased to be given a chance to review Steve Oualline’s new Wicked Cool Perl Scripts book (Feb 2006, No Starch Press). It offers collections of ready-to-use code snippets that raise the abstraction level from the basic “how do I express something in Perl” up to “how do I get a particular coding job done”.

The book is split into 11 chapters, with topics ranging from CGI programs to Internet Data Mining to Games and Learning tools. Each of these topics has a definite point of view, and a set of problems they intend to help with. It was a bit of a shift to read through these, because I’d been expecting topics much more data-type oriented, such as Tricks with Strings or Fantastic File Manipulation, which is not what this book offers.

The biggest problem when offering such task-specific examples is that it’s really hard to use the book to solve particular problems that lie outside the book’s narrative, let alone transfer what you learn from the book into new problem solving. Another problem is that the task-specific examples have a lot of overhead. Cool Script #41, for example, is a Map Generator which runs on for 14 pages, with much of its code even to my non-Perl eyes being a bit weak and redundant. It’s great if you actually need a Map Generator. Less great if you intend to use the principles from the example in another application.

On the up side, the examples are all easy to follow with excellent narrative. I very much liked the way the code was laid out for reading and then discussed. Oualline clearly put a lot of effort into presenting this material to his audience, which is Unix-savvy beginning-to-intermediate Perl programmers.

It’s hard to fault a book for being what it is and not what you had hoped it would be. Wicked Cool Perl Scripts provides excellent and useful scripts to do the specific things the author intends them to be used for. Before buying, I recommend you read through the table of contents. See whether the book includes the right solutions for your personal problems. If so, Wicked Cool Perl Scripts may save you a great deal of time and effort.

Have you read Wicked Cool Perl Scripts? I’d be interested in hearing your opinions in the comments.