Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Don't ask to ask, just ask
 
PerlMonks  

PERL - How to Program

by jepri (Parson)
on Nov 15, 2001 at 08:13 UTC ( #125503=bookreview: print w/ replies, xml ) Need Help??

Item Description: A very complete perl book

Review Synopsis:

Is there somebody here by the name of Deitel? Because PERL How to Program by Deitel looks a lot like it was written by a perl monk. This 1029 page book (personally I would have cut 5 pages out, no matter how difficult) covers all the issues that have been hot topics over the last year, as well as providing a good introduction into programming, and perl programming.

Don't be put off by the size or the attempt to be comprehensive. Each chapter is stands on it's own, starting with an explanation of why the chapter is there, and then moves into the juicy bits. And juicy they are. The author covers core perl functionality and CGI, DBI and LWP. Whole chapters take detours into file and directory manipulation, using formats, sessions and cookies, process management, web security, Tk, accessibility, XML, CSS and HTML. Phew. There's more, but you should read the table of contents for the full list.

The highlight of the book is that it demonstrates good programming practice. Modules and the strict pragma are introduced in chapter 6, and from that point on every example program uses strict;. Every program also uses warnings, indicating that the authors are as up-to-date as we would hope them to be. And (can ya believe it?) the book has a section on taint checking. It's a good one too, describing how to clean tainted variables with regular expressions.

One of the things that differentiates the book is its little asides, which are broken down into Common Programming Errors, Performance Tip, Portability Tips, Testing and Debugging Tips, Good Programming Practice and Software Engineering Observations. I’ve probably left a few out as well. These asides are usually only a sentence long, but contain the wisdom that is often deeply buried in the perl man pages. The Common Programming Errors are definitely the jewels in the book – they offer very relevant and useful tips like: "Forgetting to return a true value from a module will cause a fatal compile time error" (in the section on writing modules). I know I've seen at least two Seekers of Perl Wisdom questions about exactly that.

Lest you think that the book is too simple, I should point out that the chapters on arrays and data structures go into binary searches and binary trees using hashes, while the networking section shows how to send and receive mail, and a code example showing how to write your own chat servent. The XML section covers what you would want – VoiceXML and XSL and DTDs and DOMs and lions and tigers and bears – oh my! The network section has examples of sending and receiving mail (using modules).

The code! I almost forgot to mention the book has many chunks of code examples, all well commented, with example output from the programs. The programs are then dissected to show what they do.

But wait! There's more! Each chapter has a summary and mini-index, a list of www resources and a list of references where applicable. The CDROM that comes with the book has a copy of Perl 5.6 and ActiveState’s Perl 5.6, MYSQL, Apache, and all the code from the book in convenient-to-run files. The last chapter of the book, strangely, is an introduction to Python programming.

It feels kind of strange to write a review without mentioning any down points, but I'm having trouble finding them. If I really tried to find faults I might mention that the regex chapter is barely more than a search and replace tutorial, and sometimes the code reads more like C than Perl ( like the authors sometimes put ()s around print statements. E.g. print(arg1, arg2, arg3, arg4, ...) rather than print arg1, arg2, arg3, arg4, .... I suspect this is from a desire for clarity, since they show that they do know advanced perl idioms. There are no advanced techniques in the book, but you wouldn't expect that in a 'how to program book'.

Overall I am very impressed with this book. It covers many topics without being shallow, explains things simply without condescending and contains enough detail and references to make it useful to almost anyone. It is factually correct and does not omit or overlook important points. It encourages the use of CPAN, modules and good programming styles without degenerating into the religious fervour that is so common when dealing with those topics. If it was a bit cheaper I’d be giving away copies for christmas, but instead I’ll be keeping this one for myself.

Update - Frickin' internet explorer mangled the punctuation. Now cleaing it.

Comment on PERL - How to Program
Re: PERL - How to Program
by japhy (Canon) on Nov 15, 2001 at 11:13 UTC
    I find that most of the Deitel & Deitel books are very good for beginners and not too dumb for intermediates. I like their work.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Back to Reviews

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: bookreview [id://125503]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2014-04-20 14:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls