Customer Reviews


1 Review
5 star:    (0)
4 star:    (0)
3 star:
 (1)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
Share your thoughts with other customers
Create your own review
 
 
Most Helpful First | Newest First

9 of 9 people found the following review helpful
3.0 out of 5 stars A mixed bag of solid scripting, 24 July 2007
This review is from: Wicked Cool Perl Scripts: Useful Perl Scripts That Solve Difficult Problems (Paperback)
The problem with book titles which marry terms like 'wicked' and 'cool' with programming, is that scripts which, for example, determine the particular type of EOL marker in a file, may not match your personal definition of cool. More realistically, the book's subtitle promises that the 40ish programs given here are 'useful', and this is more or less true.

There's plenty here with a system administration flavour, e.g. a duplicate file finder, a website dead link checker, a Unix user deletion script. Also, the Tk toolkit is used for some simple GUIs, and the Image::Magick module for manipulating graphics, which is probably enough to get you started on your own ideas.

Even if your needs and interests don't align with the author's, a lot of the scripts remain useful, if not for the exact content, then at least for providing the skeleton that you can use for your own ends. Some of the scripts use an object oriented interface, but don't require the user to create an OO module, so as long as you're comfortable with references, most of the code here is very good for building a beginner's confidence in tackling non trivial scripts. There's also a reasonable amount of explanation of what the different bits of the code are doing, although the layout of the annotation is not particularly effective (the Head First books still lead the way in this), and the discussion does not go too high level. This is appropriate for the most part, but you're probably not going to be able to get too far with Tk on your own from just the material provided in this book.

On the downside, the Perl itself is not very idiomatic, so you may pick up some bad habits from the style. For example, the size of an array is checked with 'if ($#words != 1)' where 'if (@words != 2)' would be the more usual form. Sometimes scalars are implicitly initialised with undef (e.g. 'my $x', the usual practice), sometimes they're explicitly assigned (e.g. 'my $x = undef'), all in the same script. Return statements are always given in the form 'return ($x)'. This is nothing a good dose of Perl Best Practices can't fix, however.

Additionally, there are some unfortunate typos, e.g. the discussion of script 38 refers to $\ as the input record separator, while the code itself correctly uses $/. I spotted a stray 'TODO: Need something here to go somewhere' comment in script 34 which did not inspire an enormous amount of confidence.

And when it comes down to it, I just didn't find many of the scripts all that interesting. There's a whole chapter on downloading and using United States Geographical Survey mapping data, which didn't do much for me, I have to admit. The 'internet data mining' chapter is very weak, consisting of only two scripts, the first using the Finance::Quote module to print out a stock price, and the second to download some pictures from the web. For a book published in 2006, one might have expected something on web services or RSS. Given the amount of material devoted to GUIs and graphics, it's also a bit disappointing that there's almost nothing music or sound-related to be found in the entire book (one of the scripts does play a sound, but shells out to do so). The final chapter is about displaying a regular expression pattern as a finite state machine. Again, this is a solid, non-trivial example of running Perl, but if like me, you find regular expressions about as intrinsically fascinating as printf formatting codes, your pulse will not be racing at the prospect of slogging through all 2,000ish lines.

Overall, this is a decent if not spectacular collection. If you've learnt just enough Perl to be dangerous, but are not quite sure how to put it all together into a running program, this book provides inspiration. You might want to look at Perl Cookbook too, though.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


Most Helpful First | Newest First

This product

Wicked Cool Perl Scripts: Useful Perl Scripts That Solve Difficult Problems
£19.99
In stock
Add to basket Add to wishlist
Only search this product's reviews