- Paperback: 336 pages
- Publisher: No Starch Press; 1 edition (February 15, 2006)
- Language: English
- ISBN-10: 1593270623
- ISBN-13: 978-1593270629
- Product Dimensions: 7 x 1.1 x 9.2 inches
- Shipping Weight: 1.4 pounds (View shipping rates and policies)
- Average Customer Review: 11 customer reviews
- Amazon Best Sellers Rank: #1,485,791 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Wicked Cool Perl Scripts: Useful Perl Scripts That Solve Difficult Problems 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Frequently bought together
Customers who bought this item also bought
"A book about kick-starting your programming imagination . . . [it] will get you thinking about . . . creating practical solutions to your problems." -- About.com Guide to Perl, May 22, 2006
"Exemplifies the practical approach, highlighting utilities that make readers' computing and online lives easier." -- Library Journal Reviews, May 1, 2006
"Provides excellent and useful scripts to do the specific things the author intends them to be used for." -- OReilly.net, April 24, 2006
"This is not your typical Perl book . . . great for a Perl programmer who has a flair for unique issues." -- Free Software Magazine, April 20, 2006
From the Back Cover
You can do a lot of strange and wonderful things with the Perl languageif you know how. Many Perl programmers have been frustrated at one time or another because the system was missing some simple and obvious utility. Wicked Cool Perl Scripts is your guide to writing those utilities quickly and easily.
This book contains a wide variety of scripts including ones that make use of really cool Perl features (see script #1 Automatic Help Option) and Internet data mining (try script #18 Getting Stock Quotes or script #19 Comics Download).
It also contains games (like Teaching a Toddler, script #35), programs to make system administration easier (such as Mass File Renaming, script #21), and even a program to help someone hiking the Grand Canyon (script #42 Location Finder).
Even the most experienced programmer can benefit from script #46 the Regular Expression Grapher which shows you how a complex expression like /^.*(a|b|c).+$/ can be made into a simple, easily understood graph.
If youre a Perl programmer who wants to learn the ins and outs as well as the hidden corners of the language, Wicked Cool Perl Scripts will show you simple and elegant hacks as well as some extreme examples of power programming. With Wicked Cool Perl Scripts in hand, youll be doing things you never even thought possible in Perl. Youll be using the language to do real work, of course, but youll also be producing wickedly cool programs.
Browse award-winning titles. See more
Top customer reviews
For example, in one of the earliest examples, the authors uses "return undef" in a situation where the return value of the routine is assigned to an array, to indicate the routine didn't find any of whatever it was looking for. Unfortunately, this is a mistake, the correct code would be to use "return;" all on its own. The correct solution produces an empty array or interim values; the mistake creates an array containing one element, 'undef'.
There are a number of similar mistakes which indicate the author is in over his head, writing things he doesn't understand; the editors know even less about the matter; and the code was never tested and verified for correctness.
If you want to learn Perl, get "Learning Perl"; If you want to improve your Perl, get "Intermediate Perl.
The scripts themselves, however, are not exactly what I would call "wicked cool". The title is an obvious marketing conceit, designed to make the book seem more enticing. Most of the scripts, in fact, are surprisingly mundane -- but that doesn't mean they aren't useful. You may actually find yourself using some of them, with minor alterations, in your day-to-day life. Just don't expect to be wowed by the scripts themselves.
The recipes explained in the book are not nearly as good as those in ie. Perl Cookbook, and don't seem to be that usable either. This book looks more like a collection of school assignments with solutions than practical examples needed by a developer. It may be interesting for someone who wants to learn Perl, but then it may also be too hard for beginners to comprehend the code inside the book (the explanations are not that elaborate).
The list of recipes might look interesting at first glance, but if you go into depth with this book, you soon notice that it simply isn't worth it.
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.
Most recent customer reviews
I have nothing good to say about this book. I don't have anything bad to say (except maybe that I dislike titles like this), but...Read more