HOP is a wonderful book. However, what's not wonderful about the book is the lack of strict. I just spent 3 hours trying to track down a problem when I remembered that the code didn't use strict. Two seconds later, I found my bug. Grr ...
While this error you've spotted is possibly a typo, that wasn't in Mark's original code, to me it highlights why use strict and warnings are such useful things to include in your programs.
Re:The strict Mantra
sigzero on 2005-05-15T19:19:51
Not only do I tell newbies to "use strict", I also tell them to "use warnings" as well. I personally believe that if something doesn't pass "use strict" (without good reason), it shouldn't be in release code.
HOP is a good book and has me thinking about Perl in different ways.
Mark is not a fan of strictures for some bewildering reason. None of the program repair shop articles at Perl.com use strict
either. I wonder stance his new book will take.