Slashdot Mirror


Beginning Perl, 2nd Ed.

James Edward Gray II writes "Beginning Perl (Second Edition) is a well named text that starts exactly where it claims. It assumes no prior knowledge of Perl or of programming in general. If that describes your needs, this book is a fine place to start." Read on for the rest of Gray's review. Beginning Perl (Second Edition) author James Lee with Simon Cozens and Peter Wainwright pages 429 publisher Apress rating 7 reviewer James Edward Gray II ISBN 159059391X summary A Solid First Perl Tutorial.

Beginning Perl is a conversational-style tutorial that will guide you through your first steps into the Perl world and even a little beyond. The first two-thirds of the book cover the basics of programming with Perl including data types, flow control and IO.

The casual flow through here will help prevent fledgling programmers from suffering information overload. The authors handle the need to provide enough information, though, by revisiting topics repeatedly, going a little deeper each time. Unfortunately, this hurts the volume's use as a reference, as it's quite a challenge to go right to something. (Example: The built-in join() is covered in the chapter on "Regular Expressions," which is certainly not the first place I would look.) The index is decent and can guide you through these problems, if you remember to start there.

In keeping with the book's tone, side-trips and diversions are fairly common. Early on, these center around topics like "How to Think Like a Programmer" and "What Exactly is a Binary Number." I mention this because I know some readers appreciate this level of detail, while the interruptions annoy others. I found many of the discussions insightful, but it did occasionally get carried away with itself. (Example: There is a whole page on Perl's versioning scheme that goes so far as to discuss what a "patch pumpkin" is. Interesting or not, it seems out of place in here.)

One of Beginning Perl's real strengths is its constant encouragement of the programmer in training to experiment as a means of further learning. The text often suggests things to try and each chapter ends with a set of exercises. Answers to exercises are provided in an appendix. The only way to really learn programming is to program, so I was glad to see this push in the right direction.

The final third of the book digs a little deeper, examining references, object oriented programming, the CGI protocol and interfacing with an external database. Make no mistake, these are only introductions, but they are a nice addition to a beginner's book that will have you doing a little practical programming quickly. The "Introduction to CGI" and "Perl and DBI" (database interface) chapters really stood out here.

Two chapters were rocky enough to mention. "Regular Expressions" does not handle its content well, I'm afraid. You spend most of the chapter seeing if a pattern matched, but not what it matched. That's an important distinction for me. Learning regular expressions can be tricky and you need to see exactly what's going on. This issue is finally address near the end of the chapter, but it needed to come sooner. True beginners will likely need considerable experimentation of another book to really catch on to regular expressions.

"Object-Oriented Perl" was also problematic. Frankly the chapter bit off more than it could chew and doesn't really manage to teach much because of it. (Example: Inheritance isn't even addressed.) I think a better use of the chapter would have been to outline only the use of objects as a setup for later chapters, leaving the creation of objects to a volume that could spare the space to do the topic justice. Again, beginners will definitely need more material to be comfortable with object oriented programming.

To summarize, if you've wanted to learn Perl but haven't yet taken the plunge, you could do a lot worse than to start with this book. It's a casual tour of the basics with a few teasers for further study opportunities.

You can purchase Beginning Perl, 2nd Ed. from bn.com. Slashdot welcomes readers' book reviews. To see your own review here, carefully read the book review guidelines, then visit the submission page.

9 of 141 comments (clear)

  1. Only a 7? by Anonymous Coward · · Score: 1, Funny

    Only a 7/10 score? What did the author ever do to you to deserve such a cutting insult? He must have had to kill your cat, steal your girlfriend, or erase your SNES emulator saved-game directory! Possibly he even put the toilet seat down at your house, causing you to accidentally leave a few pee drops on the seat when you took a midnight piss while tired and bleary-eyed. I can't say. I honestly can't imagine what it would take to send a man over the edge and only give a 7 for such an excellent book.

  2. sorry, I hate perl. by grub · · Score: 3, Funny


    It assumes no prior knowledge of Perl or of programming in general.

    Does it mention the need for chicken blood, human tallow candles and pentagrams made from ground baby skull? Sorry, I liked Perl Back In The Day but the OO is just bolted on and I can't do anything with it I can't accomplish with Python (or Ruby although I'm still learning that).

    --
    Trolling is a art,
  3. perl6 book coming soon by OmniVector · · Score: 4, Funny

    don't forget to pick up a copy of the new perl 6 book!

    --
    - tristan
  4. If you go through the book in detail... by kclittle · · Score: 4, Funny
    ...carefully doing all the exercises, you can then go back to the first page and see that you have no idea what the first example is trying to do -- it is, after all, Perl. :)

    --
    Generally, bash is superior to python in those environments where python is not installed.
  5. Beginning Perl by BabyJaysus · · Score: 2, Funny

    #!/usr/bin/perl -w

  6. Re:For those of us who are too cheap.... by rduke15 · · Score: 2, Funny
    For cheap beginners, they should certainly first know that they can just type
    perldoc perlintro
    or
    perldoc perl
    etc.

    After that, they can see in
    perldoc perldoc
    what else they already have at their fingertips.

    And of course, even non-cheap non-beginners will continue using the rest of perldoc.
  7. Re:Hold Crap! by Coryoth · · Score: 3, Funny

    (if (parses (your brain) (things that way)) (is (lisp fun)))

    To be honest mine doesn't (which is probably why the above is quite wrong), but I do know people who seem to find it far more "natural" and "readable".

    Jedidiah.

  8. Re:Hold Crap! by John+Bokma · · Score: 2, Funny

    PHP is a programming language?

  9. Re:No prior knowledge by Cryptnotic · · Score: 2, Funny

    CGI is dead

    Not until Netcraft confirms it.

    --
    My other first post is car post.