I am a relative new comer to Perl and as such, in need of as much help as I can get. The underlying philosophy of Perl is There Is More Than One Way To Do It (TIMTOWTDI). This makes the language very attractive, as it then suits all sorts of mindsets, but it can lead to confused, ugly code, prone to bugs and difficult to maintain.
Peschko and DeWolfe take a gentle slow pace and over the past few weeks I have been glad of it. I particularly like their clear logical flow diagrams, especially in relation to regular expressions - such an important part of Perl. I was not quite so comfortable with their choice of variable names like arrayName. This led me to confuse code and data. An item like $scalar could easily be confused by a beginner with some sort of type declaration, particularly those coming from C. It is a bit like a C programmer, if he were allowed, naming a variable int ! (Confusing naming with declaration.) There is also the occasional indentation slip, where comments get wrapped around into code (page 93). Readers are pointed to Perl web sites and newsgroups, but there is no reference to the Perl series from O'Reilly; the Perl Cookbook, the Camel, etc. Perhaps this is for commercial reasons. It appears to me that the O'Reilly books are essential reading for Perl programmers.
This particular edition is a manifestation of a previous title by the same authors, Perl 5 Complete and we are promised that the numerous errors of its predecessor have been eradicated and that the index has been improved. However, they have still got a long way to go. The index is pathetic, especially for symbols - so essential for Perl - and regular expressions. There are coding errors. On page 120 we have;
foreach $arg (1,2,3)
{
}
continue
{
print $arg;
$arg = 2;
}
which Perl does not like at all. $arg is a read-only variable!
So, approach the code with caution and do not rely on this book alone. These slips make me uneasy. I was not in a position to check every line and could not get the accompanying CD to mount (a serious failing in itself). Somewhere inside they do mention an author's web site, but for the life of me I cannot find it now (index again - grrrr)!
However, I am disinclined to completely dismiss this effort. Obviously the authors have put a lot of work into the preparation and the coverage is wide, all the way from CGI programming to object orientation and Perl formats. This means that a lot of material from several other books is rolled into one.