by No Starch Press
| Average Rating: |
|
| Sales Rank: | 144604 (lower is better) |
| Price Used: | $4.99 |
| Shipping: | Free Shipping on most orders over $25* |
| Availability: | Usually ships in 24 hours |
| Label: | No Starch Press |
| Pages: | 336 |
| Binding: | Paperback |
| Publication Date: | 2006-02-15 |
| Published By: | No Starch Press |
| ASIN: | 1593270623 |
| Category: | Book |
Authors
Editorial Reviews and Product Descriptions
Product Description
Most Perl programmers have been frustrated at one time or another because the system just wouldn't do what they wanted it to do. There was that one simple and obvious utility that was missing that would make life so much easier: A tool to get a stock quote, show off a photograph collection, or even display a collection of favorite comics. Wicked Cool Perl Scripts is about writing those utilities quickly and easily. A collection of handy utilities that solves difficult problems, Wicked Cool Perl Scripts is a great resource for the savvy Perl programmer.
Customer Reviews
a mixed bag of solid scripting - Reviewed on 2007-07-24
1 customer found this review helpful, 1 did not.
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.
A book full of examples of how NOT to write perl - Reviewed on 2007-02-18
12 customers found this review helpful, 1 did not.
I couldn't resist the title, so I got this book. Unfortunately, I cannot reccommend it to people who want to learn to write better Perl, execpt as a source of examples of the mistakes you should avoid.
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.
Tom
Good, yes. Wicked cool, maybe not. - Reviewed on 2006-12-20
2 customers found this review helpful.
This is a great book for learning by example, particularly as a follow-on to something like Learning Perl to get you started. It provides a number of useful scripts (even though some of them duplicate functionality of common system utilities), with explanations of how and why they work, and even notes on how you might alter the code to suit your own purposes. If you're a relatively new programmer that already has the basics of Perl in mind, but find yourself at loose ends wondering what to do next to help cement what you know and start learning more, this book may be exactly what you need. It's also useful for figuring out some of the basic principles of translating code between Perl and another language, thanks to the source code explanations.
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.
* - See Amazon
Product Page for shipping and pricing details.
Book Subjects
- High level programming languages
- Programming languages
- Object-oriented programming (Computer science
- Perl (Computer program language)
- Computers
- Computers - Languages / Programming
- Computer Books: Languages
- Computers / Programming / General
- Computers / Programming / Software Development
- Computers / Programming Languages / JavaScript & VBScript
- Computers / Programming Languages / Perl
- Programming Languages - Perl
- Programming Languages - CGI, Javascript, Perl, VBScript
- Object-oriented programming (Computer science)
- Computing: Professional & Programming