Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Programming Perl, 3rd Edition

Posted by timothy on Tue Dec 05, 2000 10:15 AM
from the would-you-walk-a-mile-for-a-camel? dept.
Chronic reviewer chromatic writes again, this time with a review of the newest iteration of what is probably the emblematic Perl book, the O'Reilly camel book. Read on to see how it stacks up to earlier versions of that work, and whether your Perl skills would benefit from reading through it.

Programming Perl (third edition)
author Larry Wall, Tom Christiansen, & Jon Orwant
pages 1067
publisher O'Reilly & Associates
rating 9.5
reviewer chromatic
ISBN 0-596-0027-8
summary The definitive guide to the Perl language, updated for 5.6.1.

*

The Scoop

Longtime Perl fans know Programming Perl as the Camel, because of the cover animal. With the first edition in 1991, Perl programmers gained not only a charmingly appropriate mascot, but the ultimate language reference. True to form, this Camel's grown with the language. In the four years since the last release, it's increased in size by 67%.

Everything you liked about previous editions has returned, in one form or another. Additionally, this third edition covers the largest changes made for Perl 5.6 (actually 5.6.1, as the book's ahead of the current stable release by a bit) -- Unicode, threading, and more Perl guts.

While the previous editions were exceptionally well-written references, they were also aimed squarely at experienced programmers. This edition pushes back the starting blocks somewhat, providing a gentler introduction to the world of Perl. The wealth of new information is staggering, but as you'd expect from the luminous authors, even the core language reference is highly readable and entertaining.

What's to Like?

Logically, the book is divided into five main sections. (Gone are the massive 80-page chapters of the second edition). The first section, one chapter, gives a good overview of Perl, as a language and a philosophy. It includes a quick introduction. The second section gives the language's gory details, covering just about everything you would need to know. It's arranged in terms of ascending complexity. The enhanced, extended, and improved regular expression chapter stands out as the best member of this group.

The third section discusses Perl as technology. Here's where Unicode comes in, as well as the internals of Perl (through the internal compilation process, using the debugger, or using XS to extend Perl with C code). Everything here is quite good. Expectably dry subjects like Unicode or threading are readable and even a little entertaining. If you're not convinced, you can skip around and still learn quite a bit.

The fourth section is devoted to Perl as culture, with discussions about portability, security, good practices, documentation, CPAN, and a bit of poetry. The security chapter is quite good, but left me wanting more information. Any chapter here is accessible if you've made it through the second section, so feel free to pick and choose what you need to know.

Rounding up the spare bits is the reference section. Not only will you find descriptions of the special variables, built-in functions, and standard library, but the organization and presentation of these descriptions has improved. Functions have little annotations listing which magic variables they set, possible exceptions they raise, and the like. That accounts for 150 pages of the overall goodness. Don't skip the glossary at the end, if you're confused or looking for amusement.

What's to Consider?

While it's a temporary conundrum, it's a little odd to read about features that aren't quite implemented yet. This is most noticeable in the Unicode discussions and the chapter on threading. Occasionally, the authors will describe a feature and then admit that the specifics will likely change. (Have a look at the documentation.) Granted, the bulk of the language is mature and stable, and the definitive guide can't very well get by with ignoring major features, but it reads a little oddly.

The intended audience is still the serious Perl programmer. Dabblers and casual learners will find enlightenment and instruction. Realize, though, that while it's easier to start your journey here, absolute beginners would do well to explore a Learning Perl or Elements of Programming with Perl first. People who've programmed before (beyond dabbling with VB, or doing mouseovers in Web pages) should have little difficulty picking up the Perl language and mindset.

The only other possible improvement that comes to mind is expanding certain chapters. As noted before, there's more to say about security and efficiency. It would also be nice to have a chapter on common Perl idioms one might find in EFNet #Perl or at Perl Monks, or the latest Perl Mongers meeting. (Half of the fun is discovering and sharing new tricks and shortcuts.)

The Summary

Part of being a good programmer is knowing where to turn for accurate and useful information. This is the place for all things Perl. If you use Perl regularly, put the new Camel on your shelf.

Table of Contents

  1. Overview
    1. An Overview of Perl
  2. The Gory Details
    1. Bits and Pieces
    2. Unary and Binary Operators
    3. Statements and Declarations
    4. Pattern Matching
    5. Subroutines
    6. Formats
    7. References
    8. Data Structures
    9. Packages
    10. Modules
    11. Objects
    12. Overloading
    13. Tied Variables
  3. Perl as Technology
    1. Unicode
    2. Interprocess Communication
    3. Threads
    4. Compiling
    5. The Command-Line Interface
    6. The Perl Debugger
    7. Internals and Externals
  4. Perl as Culture
    1. CPAN
    2. Security
    3. Common Practices
    4. Portable Perl
    5. Plain Old Documentation
    6. Perl Culture
  5. Reference Material
    1. Special Names
    2. Functions
    3. The Standard Perl Library
    4. Pragmatic Modules
    5. Standard Modules
    6. Diagnostic Messages

    Glossary
    Index


You can purchase this book at ThinkGeek.

This discussion has been archived. No new comments can be posted.
Perl Book | Log In/Create an Account | Top | 99 comments (Spill at 50!) | Index Only | Search Discussion
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1) | 2
  • That book was good (Score:3)

    by billybob2001 (234675) on Tuesday December 05 2000, @05:22AM (#581230)
    chomp <>;

    Next

    (Those books don't last like the old ones used to)

  • Odd timing, what? (Score:3)

    by The Welcome Rain (31576) on Tuesday December 05 2000, @05:24AM (#581231)

    I wouldn't have expected a third edition of the camel just now. Isn't Perl6 coming out Real Soon Now? I understand it will introduce some significant new capabilities. Given that, I'd have waited.

    --

  • Would I walk a mile for a camel? by AFCArchvile (Score:1) Tuesday December 05 2000, @05:27AM
  • Re:Odd timing, what? by jperegrino (Score:1) Tuesday December 05 2000, @05:29AM
  • Re:Would I walk a mile for a camel? by Jedi Alec (Score:2) Tuesday December 05 2000, @05:30AM
  • 1067 pages by Anonymous Coward (Score:1) Tuesday December 05 2000, @05:30AM
  • It's just not the same by ackthpt (Score:2) Tuesday December 05 2000, @05:31AM
  • by Masem (1171) on Tuesday December 05 2000, @05:31AM (#581237)
    I know it's been talked about before, but it seems odd to try to write books that are aimed at moving feature sets, such as perl, HTML, etc, without some mechanism for the user to get the next version or three at a free or reduced cost. (Mind you, O'Reilly books are generally inexpensive, but this is true for all publishers). Certainly has having used the 1st edition of Camel, I know that perl has changed a lot in 5 or so years, and much of that first book, while not depriciated, doesn't fully cover what I need to know nowadays for perl hacking. I've been hestitent to buy the more recent editions because I see the same problem happening in another 2 or 3 years. As this review points out, some of the features on Unicode and threading could be wrong when 5.6.1 is released, making those pages of the book useless.

    While electronic books can easily fix this problem, that's not the solution when you need to look at paper copies, whether at the terminal or on the toilet. Maybe there should be some way to 'register' the books, such that when the n+1(th) edition comes out, you can get it for a substanially less cost, because your initial purchase of the nth edition helped to make the n+1(th) edition possible. Or one could send in the cover of the nth edition and a S&H charge to get a copy of the new book. Or something along these lines.

    If any computer book publishing company could do this, I would expect ORA to be the first to try such, given their helpfulness in the past and present. But with many standard 'things' moving so fast (XML, HTML, Perl, Python, etc), we need a some book upgrade mechanism in place ASAP.

  • Still on the first edition. by funkman (Score:2) Tuesday December 05 2000, @05:32AM
  • Re:Why? by the Man in Black (Score:1) Tuesday December 05 2000, @05:34AM
  • This is the book I learned perl on. by tshak (Score:1) Tuesday December 05 2000, @05:34AM
  • evolution by aerobee (Score:1) Tuesday December 05 2000, @05:36AM
  • Seriously, I don't see much use for perl other than for programming server-side applications (i.e., the Slashcode which powers Slashdot's forum system, etc.). Until I do get into the server world, I won't need it.
    Well you're missing out on Perl's real uses then!

    Perl isn't ideal for Slashcode (it's too large and crappy, other technology would be better). It is really good for knocking up quick scripts... Want to rename a bunch of mp3 files so they don't have spaces in their name? Perl's for you. Want to rename mp3 files based on CDDB information? Perl's for you.

    I just picked those off the top of my head, but I use Perl daily for small scripts to cut out mundane shell typing. It's also ideally suited to build scripts and environments.

  • Flamebait? But Perl code DOES look awful! by Anonymous Coward (Score:1) Tuesday December 05 2000, @05:38AM
  • Re:Why? by Gibbys Box of Trix (Score:1) Tuesday December 05 2000, @05:38AM
  • Re:Books on moving targets by the Man in Black (Score:1) Tuesday December 05 2000, @05:39AM
  • Re:Would I walk a mile for a camel? by chris\ (Score:1) Tuesday December 05 2000, @05:42AM
  • Re:Would I walk a mile for a camel? by AFCArchvile (Score:1) Tuesday December 05 2000, @05:42AM
  • Re:Books on moving targets by thaigan (Score:1) Tuesday December 05 2000, @05:43AM
  • Re:Why? by ichimunki (Score:1) Tuesday December 05 2000, @05:44AM
  • Re:Would I walk a mile for a camel? by the Man in Black (Score:1) Tuesday December 05 2000, @05:44AM
  • Computers are moving targets by Hairy_Potter (Score:2) Tuesday December 05 2000, @05:45AM
  • Re:Books on moving targets by thaigan (Score:1) Tuesday December 05 2000, @05:46AM
  • Re: Eek. by AFCArchvile (Score:1) Tuesday December 05 2000, @05:48AM
  • Re:Would I walk a mile for a camel? by complex (Score:2) Tuesday December 05 2000, @05:48AM
  • Re:Computers are moving targets by thaigan (Score:1) Tuesday December 05 2000, @05:49AM
  • Uses for Perl by Jaeger (Score:1) Tuesday December 05 2000, @05:50AM
  • Re:Would I walk a mile for a camel? by AFCArchvile (Score:1) Tuesday December 05 2000, @05:51AM
  • Re:Would I walk a mile for a camel? by wangi (Score:1) Tuesday December 05 2000, @05:54AM
  • Re:Would I walk a mile for a camel? by beebware (Score:1) Tuesday December 05 2000, @05:55AM
  • Re:Would I walk a mile for a camel? by dragonfly_blue (Score:2) Tuesday December 05 2000, @05:56AM
  • Re: Eek. by the Man in Black (Score:1) Tuesday December 05 2000, @05:57AM
  • Re:Would I walk a mile for a camel? by FatOldGoth (Score:2) Tuesday December 05 2000, @06:03AM
  • Slashcode Re:Would I walk a mile for a camel? by StandardDeviant (Score:2) Tuesday December 05 2000, @06:04AM
  • Re:Would I walk a mile for a camel? by DeathBunny (Score:1) Tuesday December 05 2000, @06:04AM
  • Re:Books on moving targets by TheFalken (Score:1) Tuesday December 05 2000, @06:05AM
  • No Merlyn, but keep Tom Christiansen? by Anonymous Coward (Score:2) Tuesday December 05 2000, @06:07AM
  • Re:Why? by prizog (Score:2) Tuesday December 05 2000, @06:11AM
  • by lar3ry (10905) on Tuesday December 05 2000, @06:17AM (#581268)
    Actually, I believe that Macintosh Bible was sold on an "upgrade" basis. If you bought the first edition, then you were entitled to two "free upgrades" (in the form of mini-booklets that they'd mail to you).

    When the second edition became available, they sent me a mail offer for a nice discount.

    I believe that they said they were using the "software business model" for the book. I just checked on Amazon and they are up to the 6th edition, except that it looks like there are now over fifty contributors to it (I believe there were just two or three in the original edition). I also don't know if they are using the same "upgrade model" of publishing, but it was quite an interesting idea. (And this was back in the 80's!)
    --
  • No mention in the review of the author change... by Snard (Score:1) Tuesday December 05 2000, @06:22AM
  • Re:Would I walk a mile for a camel? by chris\ (Score:1) Tuesday December 05 2000, @06:23AM
  • Re:Flamebait? But Perl code DOES look awful! by cyber_monkey (Score:1) Tuesday December 05 2000, @06:24AM
  • Re:Would I walk a mile for a camel? by stevey (Score:2) Tuesday December 05 2000, @06:26AM
  • Good Book by Art_XIV (Score:1) Tuesday December 05 2000, @06:26AM
  • Re:Books on moving targets by ab762 (Score:2) Tuesday December 05 2000, @06:27AM
  • Re:Would I walk a mile for a camel? by wangi (Score:1) Tuesday December 05 2000, @06:29AM
  • Other uses for Perl... by dmatos (Score:1) Tuesday December 05 2000, @06:38AM
  • Re:Books on moving targets by rigau (Score:1) Tuesday December 05 2000, @06:42AM
  • Re:It's just not the same by cjon (Score:2) Tuesday December 05 2000, @06:43AM
  • Re:Would I walk a mile for a camel? by AngusSF (Score:1) Tuesday December 05 2000, @06:44AM
  • Re:Would I walk a mile for a camel? by Jedi Alec (Score:1) Tuesday December 05 2000, @06:45AM
  • Re:Odd timing, what? by Anonymous Coward (Score:1) Tuesday December 05 2000, @06:49AM
  • Re:Why? by psxndc (Score:1) Tuesday December 05 2000, @06:50AM
  • Since when did... by otis wildflower (Score:1) Tuesday December 05 2000, @06:57AM
  • Re:Would I walk a mile for a camel? by Chagrin (Score:1) Tuesday December 05 2000, @07:04AM
  • Re:Would I walk a mile for a camel? by otis wildflower (Score:2) Tuesday December 05 2000, @07:09AM
  • Re:Why? by rm-r (Score:1) Tuesday December 05 2000, @07:25AM
  • Re:Books on moving targets by lemox (Score:1) Tuesday December 05 2000, @07:25AM
  • Re:Good Book by Bassthang (Score:2) Tuesday December 05 2000, @07:35AM
  • Re:Would I walk a mile for a camel? by spudnic (Score:1) Tuesday December 05 2000, @08:05AM
  • Re:Books on moving targets by Masem (Score:2) Tuesday December 05 2000, @08:06AM
  • Oreilly Upgrade by Anonymous Coward (Score:1) Tuesday December 05 2000, @08:12AM
  • Perl 3rd Edition needs two things: by ellem (Score:1) Tuesday December 05 2000, @08:13AM
  • Wow, lots of negativity here for a great book by jonabbey (Score:2) Tuesday December 05 2000, @08:24AM
  • Re:Typical Slashdot by jonabbey (Score:1) Tuesday December 05 2000, @08:32AM
  • Re:Wow, lots of negativity here for a great book by jonabbey (Score:1) Tuesday December 05 2000, @08:35AM
  • Re:Oreilly Upgrade by turne10 (Score:2) Tuesday December 05 2000, @08:42AM
  • Re:Books on moving targets by Kazir (Score:1) Tuesday December 05 2000, @08:43AM
  • Re:Books on moving targets by Kazir (Score:1) Tuesday December 05 2000, @08:45AM
  • Re:Would I walk a mile for a camel? by Kazir (Score:1) Tuesday December 05 2000, @08:49AM
  • Re:Fool me once by I R A Aggie (Score:1) Tuesday December 05 2000, @08:54AM
  • by aberkvam (109205) <aberkvam&coredcs,com> on Tuesday December 05 2000, @09:01AM (#581301) Homepage
    Ahh, but O'Reilly does offer an upgrade policy on their books. If you have an older edition of one of their books, they will give you a 30% discount on the newer edition. All you need is the title page of the older edition. Details are available at http://www.oreilly.com/order/upgrade.html [oreilly.com].

    Okay, it's not quite "a S&H charge to get a copy of the new book" but that's a rather unrealistic expectation anyway.

  • by DG (989) on Tuesday December 05 2000, @09:21AM (#581302) Homepage Journal
    I love perl. Despite the current fashion for the peeps to distain it, it is a fantastic language for getting things DONE.

    And I don't mean just "quick'n'dirty" stuff either; I'm talking about enterprise applications that live for a long time. I have an LDAP replication daemon, written in perl, that has been running strong for two years, thank you very much.

    Perl is like English. It can be very dirty and ugly when written so, but it can also be so beautiful as to be sublime. And unlike "bondage and discipline" languages (*cough* Java *cough*) it gives you the freedom to code in an accent when needed - adapt the code to fit the problem, not the problem to fit the code!

    Those that complain that perl is illegible or hard to understand just haven't seen perl written as to be maintainable - tip: don't use Slashcode as a starting point.

    And as for Tom Christiansen... how horrible that there exists someone who stands up for code quality, and is willing to speak his mind!

    Long Live perl!

  • Re:Books on moving targets by Evil Grinn (Score:1) Tuesday December 05 2000, @09:29AM
  • Re:Books on moving targets by Evil Grinn (Score:1) Tuesday December 05 2000, @09:38AM
  • by ackthpt (218170) on Tuesday December 05 2000, @10:23AM (#581305) Homepage Journal
    (Offtopic, my a**!)

    Randal Schwartz, beyond his Perl exploits, hacked his former employer Intel, allegedly stealing passwords, and did some hacking of O'Reilly Associates. Probably politics between him and ORA, due to his lack of discretion. His, the first ORA Perl book, was enjoyable, due to his offbeat hacker humor. A less dry experience is helpful when trying to learn from a book. Then, too much humor and it can be quite frustrating. I think he provided a good balance. Randal could often be found on USENET groups, to pick his brain on various Perl problems. Always a fun guy to chat with. I wouldn't be surprised if he reads Slashdot.

    --

  • See my .sig by irix (Score:2) Tuesday December 05 2000, @10:26AM
  • Needs a chapter on changes from 5.005 to 5.6 by embobo (Score:1) Tuesday December 05 2000, @10:28AM
  • Re:Books on moving targets by rigau (Score:1) Tuesday December 05 2000, @10:39AM
  • Not for me by redd (Score:1) Tuesday December 05 2000, @11:07AM
  • Re:Good Book by AMK (Score:2) Tuesday December 05 2000, @11:18AM
  • Re:Since when did... by chromatic (Score:1) Tuesday December 05 2000, @11:30AM
  • Re:Odd timing, what? by Elian (Score:1) Tuesday December 05 2000, @12:01PM
  • Re:Perl is the English of Computer Languages by andrez (Score:1) Tuesday December 05 2000, @01:20PM
  • Re:Python is superior by ellem (Score:1) Tuesday December 05 2000, @02:25PM
  • Re:Would I walk a mile for a camel? by dragonfly_blue (Score:1) Tuesday December 05 2000, @04:31PM
  • Re:Odd timing, what? by yem (Score:1) Tuesday December 05 2000, @05:16PM
  • Re:Would I walk a mile for a camel? by phred (Score:2) Tuesday December 05 2000, @05:33PM
  • Re:1067 pages by phred (Score:2) Tuesday December 05 2000, @05:36PM
  • by phred (14852) on Tuesday December 05 2000, @05:59PM (#581319)
    Hmm. How many incorrect statements can be made in a single /. comment? This one is in the running for the record this week anyway.

    1. Randal did not "hack his former employer." Randal was not an Intel employee; he was a sysadmin on contract. Those of you who have been contract sysadmins understand the issues.

    2. He can and does speak for himself on this issue, but my understanding is that he was performing fairly ordinary security reviews for his then-current client. Due to what might be described as a personality conflict with another Intel person, his activities were "escalated" (insert wry telecom reference) to the point where PHB CYA mode kicked in. The company over-reacted and the matter was referred to the supine Washington County, Oregon district attorney. A Keystone Kops scenario of Randal's home being invaded by Law Enforcement Personnel, weapons drawn, ensued. Randal tried to persuade them with his notion of the truth, but it didn't matter; the CYA mode is one-way and the company felt impelled to 'accede' to the county pressing charges.

    3. A show trial ensued with a judge misinterpreting both the law and the facts. Randal was convicted and received a suspended sentence and a major fine. His case is STILL ON APPEAL.

    4. The lesson is here is, never forget the famous cliche "no good deed goes unpunished." Especially for those of you involved in security-related system administration. Especially when you type su

    5. Hmm, come to think of it, that means all of us who manage even a single box for just one other person.

    6. Randal did not "hack" ora.com. Child, where did you get these notions? Actually, I will say this, when Randal ran crack on Teleport around that time, James Deibele told him to knock it off. Then Intel and Washington County decided to throw the book at him and try to make a big bad example out of him. The way things are going it could have meant a jail sentence. As for the fine and court costs, my recollection is: $300,000. Look at those zeroes. There are a lot of them.

    8. Much of the humor in the first Camel is a blend of both Larry Wall and Randal Schwartz. It remains a unique contribution to the literature of computer science.

    9. "Probably politics between him and ORA." No. Read my friend Steve Silberman's piece in Wired, and you will get a much clearer view of what is going on in the Perl world. I feel very badly for Randal that after all he's done this is the kind of treatment he gets, including completely lazy, ill-informed hearsay from the likes of this 'ackthpt'.

    10. "his first ORA book". No. Go read the cover, or better yet read the book. There are TWO names on the cover.

    11. "I wouldn't be surprised if he reads Slashdot." You know, the Search box is your friend.

    It would be so nice if everyone would engage brain before steering fingers. But this is asking for the world, I know . . .

    -------
  • Re:Perl is the English of Computer Languages by Ino (Score:1) Tuesday December 05 2000, @09:15PM
  • Ruby and Perl [was Re:1067 pages] by Ino (Score:1) Tuesday December 05 2000, @09:19PM
  • Career path [was Re:Why?] by Ino (Score:1) Tuesday December 05 2000, @10:13PM
  • Re:It's just not the same (Moderator, get a clue!) by EvlG (Score:2) Wednesday December 06 2000, @12:55AM
  • Re:Would I walk a mile for a camel? by biohazard99 (Score:1) Wednesday December 06 2000, @01:10AM
  • Re:Where?? by funkman (Score:1) Wednesday December 06 2000, @05:01AM
  • State of Oregon vs. Randal Schwartz by ackthpt (Score:2) Wednesday December 06 2000, @05:52AM
  • Your bank IS using it by DG (Score:2) Wednesday December 06 2000, @06:54AM
  • Re:Good Book by Surazal (Score:2) Wednesday December 06 2000, @11:43AM
(1) | 2