http://qs321.pair.com?node_id=128553
Order Mastering Perl 5 by Eric C. Hermann

Item Description: Mastering Perl 5

Review Synopsis:

Mastering Perl 5 is a well-rounded Perl book, 894 pages long, 926 including the index. Although it may sound like a rather long book, you can learn the gist of it in about a weekend if you really had to (I'll explain later). It covers the Perl 5 language thoroughly, and teaches a little bit of CGI as well. Mastering Perl 5 also has a list of the built-in Perl 5 variables and their descriptions right inside the front and back covers, where they can easily be found.

Since this is my first Perl book, I can't rate it based upon my knowledge of Perl. But as far as programming books go, I'd say it's possibly the best programming book I've read (so far) because it simply made sense, and It wasn't so boring.

One important thing is that I like the way the book is put together. The book is divided into 6 parts, each of which are broken down into a few or several chapters. The first chapter of each part is a so-called "Jump-Start" chapter, which is an overview of the upcoming chapters.

These jump-start chapters are more than just summarries, they contain good coverage and practical examples of the programming concepts which will be re-enforced over the next few chapters. If you have proir programming experience and you're a quick enough learner, you can probably learn the Perl language by just reading the first 5 jump-start chapters, and go back to read the chapters that cover the topics that you find youself weak in. Not me, though, I like to read programming books front-to-back.

The last part of the book, which includes 4 chapters, is totally dedicated to Perl programming on Windows. It covers Win32 System Administration, the Registry and Event Log, and Databases (ODBC and SQL).

Something about the book that I noticed, is that some things are repetitive. Wait...this is a good thing because it gets some concepts into your head that you may not get the first one or two times you read it.

Another piece of the book that really stood out was how Herrmann explains the Regular Expression. I think he's done a brilliant job at explaining what makes a regex. In detail, he picks apart the sample regexes and explains how each piece of it works. Now that I know Perl 5 regexes, I am only limited to my own intelligence.

If you're coming from 'C', You can tell that the author has a 'C'-like style, he even made up a simulation of the "switch" structure. You won't pick up much Perl style from the book, but rather the logic of coding in Perl. I guess he leaves the style up to you.

Although I don't exactly feel like a Perl "Master", I found that this book was helpful. For the things that this book didn't teach me (like how to make killer one-liners), I will learn through personal experience, and from hanging around the monastery.

Would I recommend it? Yes, but advanced Perl programming concepts are only towards the end of the book. If you want to be a true Master Jedi Knight at Perl 5, you'd need other books to tackle specific Perl problems. There is no 'One book alone' that can turn you into a master.

Replies are listed 'Best First'.
Re: Mastering Perl 5 by Eric C. Hermann
by davorg (Chancellor) on Nov 30, 2001 at 15:19 UTC
    Since this is my first Perl book, I can't rate it based upon my knowledge of Perl. But as far as programming books go, I'd say it's possibly the best programming book I've read (so far) because it simply made sense, and It wasn't so boring.

    Reading stuff like this in a review worries me rather a lot. Surely the most important thing about a Perl book is whether or not it teaches good Perl. I've ranted on this theme at various other times, but this is the reason why I ignore all reader reviews at sites like Amazon. Most people who review technical books are unqualified to do so. This renders their review worthless.

    My theory is that a good book needs two things:

    • It needs to present good quality information
    • It needs to present it in a way that its target audience finds easy to follow

    The target audience for this book is obviously people with little or no Perl knowledge. Those people are therefore qualified to comment on the second of these criteria, did the book speak a language that you understood, but they are exactly the worse set of people to judge a book on the first criteria. As far as they know, the book could be teaching them the skills to be the next Matt Wright (this, by the way, would be a bad idea!) They simply have no way of knowing.

    He's a simple checklist that I use when flicking thru books in a bookshop to see how good a beginners book might be:

    • Does the book encourage the use of -w and use strict?
    • Does it explain the return values of localtime correctly?
    • Does it use -T and CGI.pm for CGI programs?
    • Does it explain finding, installing and using modules from CPAN?

    Fulfilling these criteria doesn't necessarily mean that a book is any good, but not fulfilling them guarantees that the book will be a waste of money.

    How does Mastering Perl 5 rate on these criteria?

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you don't talk about Perl club."

      Herrmann DOES encourage using strict and -w. It's one of the first things he mentions near the beginning of the book, before teaching how to code. The whole second chapter of the book is dedicated to debugging, making your code easier to debug, how to follow "Good Coding Practices", and "Avoiding Common Perl 5 Mistakes". It also shows how to debug in Emacs, in ActiveState Windows Debugger, and Debugging CGI programs.

      Yes, it does explain all the return values of localtime (page 862). An array that contains the following in order:

    • The seconds from 0 to 60

    • The minutes from 0 to 60

    • The hour of the day from 1 to 12

    • The day of the month from 1 to 31

    • The month of the year from 0 to 11

    • The year in four-digit format

    • The day of the week from 0 to 6

    • The day of the year from 1 to 365

    • Whether or not it is daylight saving time (1 indicates true)



    • Sorry no CGI.pm that I've seen. Herrmann shows how to roll your own CGI scripts, and how to decode the HTTP headers yourself (and what it actually is doing). Later on, it shows how to protect your CGI scripts from possibly being exploited by hackers by filtering meta-characters from text entries, which can be used to escape the CGI code and start shell commands on the server.

      CPAN? Yes indeed. At the time this book was written, Herrmann referred to it as ftp://ftp.cdrom.com/pub/perl/CPAN/ in the introduction of the book (unfortunately this address has been depreciated since then). Other websites and Perl newsgroups are also listed.

      The book also shows some pretty nifty advanced Windows things, like how to load DLL's and call their functions, and calling the Win32 API functions. Please don't tell me that this is beginner stuff...

        Actually, localtime returns a list not an array. Either the author got that wrong or he didn't differentiate between the two well enough for you to pick understand that there is a difference.

        Also, the year is not returned as four digits. It is the number of years since 1900 (currently 101).

        The CGI information sounds a bit flakey to me. Does he mention taint mode at all?

        I don't understand why he references CPAN thru a third-party URL that is liable to change or disappear. Why not use one of the Perl community's own URLs of http://www.cpan.org or http://search.cpan.org.

        On the basis of this test the book looks like something that I couldn't recommend, but I should probably get hold of a copy and send a review to the publishers.

        Thanks for bringing it to my attention.

        --
        <http://www.dave.org.uk>

        "The first rule of Perl club is you do not talk about Perl club."
        -- Chip Salzenberg