Paperback: 298 pages
Publisher: O'Reilly Media; 1 edition (May 18, 2006)
Product Dimensions: 6 x 0.7 x 9 inches
Shipping Weight: 14.4 ounces (View shipping rates and policies)
Average Customer Review: 4.8 out of 5 stars See all reviews (12 customer reviews)
Best Sellers Rank: #1,409,812 in Books (See Top 100 in Books) #63 in Books > Computers & Technology > Programming > Languages & Tools > Debugging #109 in Books > Computers & Technology > Programming > Languages & Tools > Perl #245 in Books > Computers & Technology > Programming > Languages & Tools > XML
This book is for experienced working Perl programmers - most likely system administrators but not necessarily - that need working solutions to real problems you'll most likely find in the workplace. There are a few diversions into such "cute" ideas as building animations in Perl, but most of these hacks are for the working programmer who is looking for ways to automate processes, build interfaces that don't get in the way of developers, and thoroughly test and simulate code. does not show the table of contents so I review this book in the context of the table of contents.Chapter 1, Productivity HacksThe hacks in this chapter are about relentless automation - saving time and effort. They allow you to find the information you want, automate repeated tasks, and find ways not to have to think about things that you do all the time.Chapter 2, User InteractionMenus, graphics, beeps, and command lines: these are all ways your programs grab user attention. This chapter is about keeping your users happy and even making your interfaces "pretty" with Perl. People may not notice when your code stays out of their way, but you know by their grimaces when it becomes an obstacle. My favorite hack in this chapter was Hack #16 "Interactive Graphical Apps". This uses sdlperl, which is a binding of the C low-level graphical library SDL for the Perl language. The hack is a short example program animating a colored rectangle and its fading tail. It first creates the needed series of surfaces, with a fading color and transparency, then animates sprites along a periodic path. It is a good example of using a GUI in PERL.Chapter 3, Data MungingPerl exists to extract, reformat, and report data.
If your a serious Perl programmer or a long-time Perl scripter whose looking to broaden your horizons then this is an excellent book. Surprisingly, this is really a Perl book for professional Perl developers, sys-admins, and scripters. This book avoids parlor-tricks like "Controlling your coffee maker with Perl" and focuses on how best to make writing and testing Perl code quick, easy, and sometimes even fun. O'Reilly's "Hacks" series of books have been hit or miss. Many books in this series regurgitate the basics a veteran probably already knows or provide convoluted or contrived examples that usually try to do too much, leaving you to extrapolate to the problem at hand. "Hacks" books can often contain an overabundance of gimmicks or games which, while instructive, can only have practical considerations for very few programmers. Some of these flaws would be acceptable in a book about "gaming" or "tuning your car" for non-professionals; this book is for people who know Perl and want to do more with it.Perl is a language that often gets called on for quick and dirty tasks so perhaps it's natural that the book has allot of excellent advice. This book manages to not reiterate the information of the core Perl book trilogy ("Learning Perl", "Programming Perl" and the "Perl Cookbook"). Instead it focuses on practical UI, database, and developer tips and tricks. It assumes you know how to put Perl through it's paces and focuses on helping you do things more effectively.I won't repeat the table of contents except to say that object-oriented programming, modules, user-interfaces, databases, and debugging are given plenty of coverage.
To be completely honest, this isn't the book I thought it was going to be. Most O'Reilly Hacks books start off pretty simply and in a few chapters take you to the further reaches of their subject area. Whilst this is a great way to quickly get a good taste of a particular topic, it has the occasional disadvantage that for subjects that you know well, the first couple of chapters can seem a bit basic. As I know Perl pretty well, I thought I would be on familiar ground for at least half of the book.I was wrong.Oh, it started off easily enough. Making use of various browser and command line tools to get easy access to Perl documentation, creating some useful shell aliases to cut down typing for your most common tasks. "Oh yes", I thought smugly to myself, "I know all that". But by about Hack 5 I was reading about little tweaks that I didn't know about. I'd start a hack thinking that I knew everything that the authors were going to cover and end up frustrated that I was on the tube and couldn't immediately try out the new trick I had just learnt.It's really that kind of book. Pretty much everyone who reads it will pick up something that will it easier for them to get their job done (well, assuming that their job involves writing Perl code!) And, of course, looking at the list of authors, that's only to be expected. The three authors listed on the cover are three of the Perl communities most respected members. And the list of other contributers reads like a who's who of people who are doing interesting things with Perl - people whose use.perl journals are always interesting or whose posts on Perl Monks are worth reading before other people's.