Forgot your password?
typodupeerror
Books Media Programming Book Reviews IT Technology

Beginning Perl, 2nd Ed. 141

Posted by timothy
from the string-them-together dept.
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.

This discussion has been archived. No new comments can be posted.

Beginning Perl, 2nd Ed.

Comments Filter:
  • Author? Publisher? (Score:1, Insightful)

    by gounthar (212393)
    Looks like somebody screwed his editing job again...
    I'd like to know who wrote it. Thanks for the info.
  • Market Flood (Score:5, Insightful)

    by strider5 (15284) on Wednesday November 24, 2004 @03:03PM (#10911202) Homepage
    was there really a market for another beginner's book in Perl?

    Learning Perl (O'Reilly) did an absolutely exquisite job at introducing people to programming and Perl simultaneously.
    • Re:Market Flood (Score:1, Insightful)

      And besides, Perl is dead, right? Hasn't PHP taken the Perl crown jewels?
      • No no, PHP sucks the Family Jewels...

        (Sorry, JAPH who tried and dislikes PHP)

      • Re:Market Flood (Score:3, Insightful)

        by 0racle (667029)
        What crown jewels? You mean regex and the vast number of pre-existing modules? I think PHP has a long way to go on both counts. I don't know PHP, I hate Python but I like Perl. However, its the modules that make it so much more usefull to me, and thats the reason I stick with it.
        • I think PHP has a long way to go on both counts. I don't know PHP...

          You think it has a long ways to go, but... You don't know PHP...

          Most of the issues people bring up about PHP are wrong.

          • I don't know how to write PHP, but I know of it.
            • One of its flaws is the regular expression issue, but the other that gives it a huge bad rep is that while you can do very complex tasks with it, the basics are easy to learn (thus inexperienced coders can turn out a lot of garbage). In this way, it's a lot like (gasp) VB...
    • That's what I was thinking when I saw the headline. Is this story a dupe from 2000, or something?
    • was there really a market for another beginner's book in Perl?

      In a free market -- not to be confused with a GPL market -- this is called competition. Just because there's already a good book out doesn't mean that a better one can't be written. Not to say that this one is better than the other. Also, publishers like to fill in their catalogs with books on all the hot/important/niche topics on the chance that one of them will really fly and to make themselves appear current and relevant to book buyers.

      A

      • While it IS true that books can go out of date quickly in this field, the fact that Larry works for O'Reilly and wrote/contributed to a number of very good Perl books for them gives the O'Reilly books an advantage.

        • Again, I wasn't trying to say that there actually is a need for a new book, or that the new book is better, I was just trying to explain why someone would publish another book on a given topic. I'm sure Larry's book still does well.

          Eric
    • Re:Market Flood (Score:5, Insightful)

      by Qzukk (229616) on Wednesday November 24, 2004 @03:21PM (#10911379) Journal
      More to the point, is there a market for another Beginning Perl 5 book now?

      The End Is Nigh [perl.org].
      • Sure, Perl 5 will remain relevant for a number of years... almost everything out there (millions of programs) is written in 5, and 6 isn't even completely written yet.

        Just because newer languages are out, doesn't mean that C++ is a bad language to learn, for example.
    • Eh, because computer books, especially the beginners' market, appears to be a good source of income - where else can you basically retype the bundled documentation for a programming language or system, and sell it for $50 a pop?
  • Miss Ol' Randal (Score:3, Informative)

    by ackthpt (218170) * on Wednesday November 24, 2004 @03:07PM (#10911239) Homepage Journal
    My favorite Perl book was the first one, published by O'Reilly, back in the 90's, by Randal. They've all seemed so dry since. :-\
  • Only a 7? (Score:1, Funny)

    by Anonymous Coward
    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.
  • by Dr. Mortimer (461903) on Wednesday November 24, 2004 @03:09PM (#10911262) Homepage
    There are also a lot of free resources out there to help you learn Perl without having to buy a book. The following website's tutorials listing helped me get started:

    http://www.perlmonks.org/index.pl?node=Tutorials [perlmonks.org]

    YMMV of course, and you may very well wind up buying a book anyway, but still check that out!
    • OSS is a wonderful thing. For those who don't know perl, I would definitly recommend learning it. For those who are intimidated by Perl or just interested in learning other useful languages (a must for every geek) try reading these free online books

      Dive into Python [diveintopython.org] - A very good and informative book on python.
      Why's (Poignant) Guide to Ruby [poignantguide.net] - If you want to read a free book on ruby, not only is the very informative, buts its an amusing read as well with quite interesting and funny stories to be told alon
    • 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.
  • by grub (11606) <slashdot@grub.net> on Wednesday November 24, 2004 @03:10PM (#10911276) Homepage Journal

    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).
    • I'm sick of this tired old argument. PERL is not object oriented (or has poor object oriented support), so PERL is bad. There are plenty of programs which do not benefit at all from being object oriented. I've written hundreds of programs in PERL, some of them very complex, and none of them have ever been object oriented or would benefit from being object oriented.
      • "Object Oriented" means a lot of different things to a lot of different people.

        If you cite examples of your designs or pieces of code of yours, I'm sure I can find some things that could look nicer or be better implemented via Python's OO mechanisms, and I am not just talking about the C++ kind of OO (encapsulation/inheritence/polymorphism) but also about Python's __getattr__ and other powerful features inherent in its OO design).
      • by pooh666 (624584)
        What really pisses me off is that you were modded BELOW this obvious troll.

        And for the record OOP in Perl is NOT bolted on, it is just that Perl is so damn flexable that you can do OOP in man ways. This is a VAST difference.. You can get into the meat of OOP with Perl and not have to depend on what someone's idea of OOP is.
  • by OmniVector (569062) <see my homepage> on Wednesday November 24, 2004 @03:13PM (#10911306) Homepage
    don't forget to pick up a copy of the new perl 6 book [otierney.net]!
    • Hee hee...although I appreciate the joke,
      • Perl 6 will not be not incompatible with Perl 5. It will automatically recognize Perl 5 source code and handle it appropriately.
      • I believe it's really being designed mostly by Larry Wall, not by a committee. (But he's asking other people to handle the implementation.)
      • The chimerical animal implies that the design and implentation are messy, but in fact the whole motivation for Perl 6 is to clean up the design (OO no longer bolted on) and implementation (internal
  • by kclittle (625128) on Wednesday November 24, 2004 @03:13PM (#10911308)
    ...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. :)

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

    I don't understand. What is he talking about?

  • First Edition's Free (Score:4, Informative)

    by enilnomi (797821) on Wednesday November 24, 2004 @03:20PM (#10911365)

    This is a great beginner's book. And if you're a beginner with no cash it's an even better book, since the first edition is available as per-chapter PDFs. Get 'em here [perl.org].

    S2
  • #!/usr/bin/perl -w
  • Reviewer uses Ruby (Score:1, Informative)

    by Anonymous Coward
    The reviewer is a frequent poster to Ruby-talk, an email list devoted to Ruby.
  • As a beginning programmer I can say that between the handful of popular scripting languages Ruby is hands-down the easiest, most logical one to pick up. Most things just make sense and don't seem like bolted on pieces added on after the fact. I have checked out Perl, Ruby, C++, and Java and acknowledge that there are different tools for different jobs. But for someone starting out I've been 10 times more efficient coding applications in Ruby. Plus what other programming language can you hop on a mailing li
  • No prior knowledge (Score:4, Insightful)

    by tootlemonde (579170) on Wednesday November 24, 2004 @04:51PM (#10912399)

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

    Books that assume no prior knowledge of programming should also give the student an idea of what else they need to know beside programming before they can do any real work.

    A partial list would be:

    1. Database design
    2. A database application and SQL
    3. An operating system
    4. A web server
    5. cgi
    6. html
    7. version control
    8. documentation

    I also recommend:

    • Debugging Perl: Troubleshooting for Programmers by Martin Brown
    • Perl Medic: Transforming Legacy Code by Peter J. Scott
    • Head First Design Patterns by Elisabeth Freeman, Bert Bates, Kathy Sierra, Eric Freeman

    Also, alert the student that it takes 5 years to become proficient and every 5 years half of what he knows is obsolete.

  • <?php
    echo "</PERL>\n";
    ?>
  • This first version of the book was written by Simon Cozens [simon-cozens.org].

    When it came to writing the second edition, Simon didn't get the job owing to his reluctance to carry it forward to future revisions, due to work restraints. So, someone else was hired, but Simon was promised 50% royalties, since it was going to be based largely on his work.

    Based on Simons latest blog post [simon-cozens.org], the publishers have conveniently forgotten this agreement. He's now not goint to get any royalties for the book, despite having written much o

If you think the system is working, ask someone who's waiting for a prompt.

Working...