This morning I finished reading the book "Pro Perl Debugging", by Richard Foley. It's a missed chance. The topic of using the Perl debugger is an interesting one, and the basic information on using it is sound. Unfortunately, the book is absolutely riddled with presentational errors. From wrong fonts to mismatches in the initial code listings, and the code which is seen in the debugging walkthrough.
Some examples:
In listing 4-1, a program is presented which contains a bug. Unfortunately, the buggy program contains a bug:
Line 9 in the listing says: my $regex = $ENV{REGEX} || '[\$\@\%\*]]+';
But in the walkthrough, line 9 suddenly is my $regex = $ENV{REGEX} || '[\$\@\%\*]&+';
. See the difference?
In chapter 11, debugging regular expressions is discussed. A common abbreviation of "regular expression" is "regex". But why is "regex" printed in a monospaced font? Totally unnecessary.
When showing a transcript of something you do on the command-line, be sure that the command-line shown is actually what produces the subsequent output:
perldb -Dr -e '"spott" =~ /spot/' [line snipped] Guessing start of match, REx 'spot' against 'sxpott'...
I think the extra costs of have the book have a hardcover could have been spent better on technical review and editing.