Perl Hacks: Tips & Tools for Programming, Debugging, and Surviving
D**S
Like a collection of really good blog posts
Imagine that chromatic were to write a professional once-a-week blog for the span of about two years, with edits and ideas from Damian Conway and Curtis "Ovid" Poe, focusing on cool Perl tricks. The result would look very similar to the Perl Hacks book.The book is filled with lots of small, self-contained gems. I've put a few of these ideas into immediate practice, like Smart::Comments. Other ideas solve problems that I didn't think had any simple solutions, like reading files backwards, which I'll use the next time I need it. Many of their ideas are curriosities, the sorts of things that are kinda cool but I never think I'll need like vi and emacs hacks, or database stuff; still, knowing that they are there and where to read more makes me much more likely to use those tools if ever the need arises.In all I'm very pleased with my purchase and I would recommend it to others. You're almost certain to find a few ideas that you can put into immediate use and many ideas that you'll bookmark mentally so you can use them in the future.
M**E
So so...
Do not buy this book. Not really worth it. I think the perl black book would be better and teach you more. There are some good hints in this book but you could find the same things on stackoverflow.com.
R**A
Do perl or die - $@
In a time when new computer languages are dime a dozen, perl unquestionably retains its beauty. Keeping with the philosophy of perl - there is more than one way to do it - the book shows you ingenious ways to work with this powerful language. This is a true hacks book and meant mostly for the advanced user. Before reading this book, I didn't even realize what I didn't know and I rate myself just short of contributing to CPAN. Even if you have read all the popular books - Perl Programming, Perl Best Practices etc. you'll still find a lot of gems.Simply put if you like perl, you'll love this book. Welcome to the next level...
C**Y
An excellent way to get more out of Perl than you ever realized
Perl is my workhorse language. I've written more Perl code, both personally and professionally, than any other language I've learned. Whenever I receive a new project, I immediately think of how I would accomplish it quickly in Perl. I've also been a fan of O'Reilly's "Hacks" series of books. When I heard of the marriage of Perl and O'Reilly's "Hacks" series in the book Perl Hacks, I knew I had to pick up a copy. It was a match made in heaven. The nature of Perl for terse, yet powerful constructs, and the hackish nature of the "Hacks" series makes for one of my favorite books in this series. The collection of articles in Perl Hacks are great for putting more productivity into your programming experience.Those of you not familiar with O'Reilly's "Hacks" Series may need an introduction. The "Hacks" Series is an ever-growing set of books with focused attention on a particular topic, like Astronomy, Mental Improvement, or even Halo 2. The books are generally short, and contain article-length "hacks" of varying difficulty, noted by a thermometer next to the hack number and description. These "hacks" fall into several categories; the non-obvious solution to a problem, the performance improvement, and the "gee, I didn't know it could do that" oddity. What makes this series special compared with other books is the willingness to "void the warranty" on a particular product, and get straight to the internals, whether they lay in hardware or software. If something can be made better by opening the covers, or twiddling with the program layout, then its eligible for inclusion in these books. The series lends itself to a wide range of topics, and the format is great for a quick read, or for (my favorite) just randomly opening the book and reading what's there.Perl Hacks is not a book that you'd find yourself reading straight through (although you do want to make sure you visit every hack in the book at least once). The book is divided into nine chapters: Productivity Hacks, User Interaction, Data Munging, Working with Modules, Object Hacks, Debugging, Developer Tricks, Know Thy Code, and Expand Your Perl Foo. There are 101 hacks in this book, ranging from the simple (Reading files backward, or managing your module paths) to the truly perverse (Replacing bad code without touching it by substituting the system-wide exit call with your own[...]. Each hack title is listed in the table of contents, with both the page number and the hack number. Each hack contains a graphic of a thermometer next to the number to show the relative difficulty of the hack (higher temperatures = more difficult hacks). There quite a variety of hacks placed throughout the book. Not once did I feel that the book was padded with something that really didn't belong in the book. If anything Perl Hacks opened my eyes to things that I would never have thought to do, but could easily see as being useful. I wouldn't have thought to create my own personal module bundles for moving my Perl programs between machines (I've always done it the old fashioned way: run, cpan install, repeat), but hack #31 makes it so "of course" that I'm thinking of including this in all of my Perl code that I ship. Hack #74 shows how to trace all of the modules your program uses (and all of their modules, too). Hack #52 is a simple hack ("Make Invisible Characters Apparent") but I can see this saving a developer or two some time when figuring out why their code isn't behaving properly. Of course, not all hacks in the book are productive (at least, not while you're programming). Hack #37, "Drink to the CPAN" is a drinking game you and your Perl buddies may want to try.Perl Hacks is a short book, at less than 300 pages, but it's loaded with incredibly useful information. Much like the "Perl Cookbook" (also from O'Reilly) you'll find lots of useful items hidden in their pages. Many times I started with one hack, and finished the chapter reading the rest of the hacks because there were just that interesting. Perl Hacks is highly recommended for any Perl programmer to have on their programmer book shelf. Sure, you might be able to find some of the hacks out there on the net, but I think you'll find as I have that this is more of a go-to reference for finding out some of the more interesting corners of Perl.
D**C
50 Perl hacks
There are 50 good hacks in this book. You'll learn new things about Perl, and about programming in general.And there are 51 bad hacks in this book. Maybe a book with 50 hacks wouldn't sell so the author padded a little. Some of the hacks were so simple that they don't deserve to be in here. Others are environment hacks, convoluted, contrived or stretch the language so far that they would make your Perl even more unmaitainable.The style is also a little annoying with every technique or CPAN module described as a "hack", and a standard section called "hacking the hack", even when there is nothing to add to the original "hack".Once you have ripped out unnecessary, unfeasible and dangerously obfuscated hacks, you have a slim volume that will take a day to read.Maybe I'm being a little unfair. Maybe I'm just the wrong audience. More advanced programmers might need to mess with symbol tables or alias module names. For me, I just need to write working code that the next programmer can maintain. Perl is already a difficult to language to write well. If I ever join a project to find that a predecessor used some of these hacks then I'll just have to start rewriting using conventional Perl.
Trustpilot
2 weeks ago
5 days ago