Book review: Wicked Cool Perl Scripts <i>by Steve Oualline</i>

Every GNU/Linux administrator will need to touch a Perl script or two at some point. Perl seems to be the scripting glue of choice since it has matured so well over the years. As a result, administrators can choose from many different Perl books. One such book is Wicked Perl Scripts by Steve Oualline and published by No Starch Press.

Wicked Perl Scripts cover

Oualline includes 47 different Perl scripts, ranging from a simple 11-line script to use perldoc to a whopping 769-line regular expression image creator. Each script includes a section for the code, command-line usage, sample output, an explanation of the script, and possible hacks you might want to perform on it.

This is not your typical Perl book

The contents

Wicked Perl Scripts is divided into 11 chapters (47 scripts), containing general purpose utilities, website management, CGI processing, data mining, UNIX system administration, image manipulation, games and learning, development, mapping, and finally the regular expression grapher. There are a few nifty scripts in the UNIX system administration section, including a nice, manual user-creation utility, and a process killer. Another nice section is the regular expression grapher. This chapter shows you how to create a Perl script to process a regular expression text string, and convert it into a decent-looking, state-based graphic. In other words, you will get a PNG file with nodes representing each node, repeats, and backtracks in the regular expression.

I found some of the scripts to be very specific solutions to some rather unique issues. For example, the author has one script (#35) where, when a key is pressed, a particular image is displayed and sound is played to entertain his toddler. Another large section of the book is dedicated to downloading and processing United States Geological Survey (USGS) topographical maps. This is not your typical Perl book.

Who is this book for?

Wicked Perl Scripts would be great for a Perl programmer who has a flair for unique issues, such as creating a mapping application, or in the words of the author, “hacking the Grand Canyon”. As opposed to a cookbook, Wicked Perl Scripts contains complete applications, not just building block code snippets. Someone who might work with some of these application topics might enjoy this book. However, someone looking to use ideas from this book to write a different type of script might find it more difficult.

While the 336 pages of the book contains a lot of gems, I would strongly suggest checking out the table of contents to see if any of these scripts really interest you before picking this book up.

Relevance to free software

The book really follows a system-independent view of Perl. In accessing the command-line version of ps, the author pointed out that command-line options might be different on other platforms. In discussing Perl, there was no mention of using non-free software modules.

Pros

The author’s writing style is enjoyable and easy to read. He includes some interesting tangent comments that kept me interested.

This would be great for you if you are interested in applying Perl to mapping or topography. The mapping application and other functions (such as printing off custom maps) would probably be worth the cost of buying your own maps.

It also contains a fantastic regular expression grapher, which would be found very useful by anyone who works with complex regular expressions. It allows you to really visualize what your expression says.

Cons

I found that some of the topics presented were very specific. While other Perl books talk about potential uses for a particular script or snippet, this book gives concrete and complete examples. Although in many ways this point can be considered a “pro”, it also limits the likelihood that you would use the book as a reference and return to it after implementing its solutions.

Title Wicked Perl Scripts
Author Steve Oualline
Publisher No Starch Press
ISBN 1593270623
Year 2006
Pages 336
CD included No
FS Oriented 10
Over all score 7

In short

License

This work is licensed under a Creative Commons Attribution 3.0 Unported License.