For the curious, here's how Randal tells the story of how this book came about:
After I had finished the first Programming Perl book with Larry Wall (in 1991), I was approached by Taos Mountain Software in Silicon Valley to produce a training course. This included having me deliver the first dozen or so courses and train their staff to continue offering the course. I wrote the course for them[1] and delivered it for them as promised.
[1]In the contract, I retained the rights to the exercises, hoping someday to reuse them in some other way, like in the magazine columns I was writing at the time. The exercises are the only things that lept from the Taos course to the book.
On the third or fourth delivery of that course (in late 1991), someone came up to me and said, "you know, I really like Programming Perl, but the way the material is presented in this course is so much easier to follow -- you oughta write a book like this course." It sounded like an opportunity to me, so I started thinking about it.
I wrote to Tim O'Reilly with a proposal based on an outline that was similar to the course I was presenting for Taos -- although I had rearranged and modified a few of the chapters based on observations in the classroom. I think that was my fastest proposal acceptance in history -- I got a message from Tim within fifteen minutes saying "we've been waiting for you to pitch a second book -- Programming Perl is selling like gangbusters." That started the effort over the next eighteen months to finish the first edition of Learning Perl.
During that time, I was starting to see an opportunity to teach Perl classes outside Silicon Valley[2], so I created a class based on the text I was writing for Learning Perl. I gave a dozen classes for various clients (including my primary contractor, Intel Oregon), and used the feedback to fine-tune the book draft even further.
[2]My Taos contract had a no-compete clause, so I had to stay out of Silicon Valley with any similar courses, which I respected for many years.
The first edition hit the streets on the first day of November, 1993[3] and became a smashing success, frequently even outpacing Programming Perl book sales.
[3]I remember that date very well, because it was also the day I was arrested at my home for computer-related-activities around my Intel contract, a series of felony charges for which I was later convicted. The appeals battle continues -- see http://www.lightlink.com/fors/for details.
The back-cover jacket of the first book said "written by a leading Perl trainer." Well, that became a self-fulfilling prophesy. Within a few months, I was starting to get email from all over the United States from people asking to have me teach at their site. In the following seven years, my company became the leading worldwide on-site Perl training company, and I had personally racked up (literally) a million frequent-flier miles. It didn't hurt that the Web started taking off about then, and the webmasters and webmistresses picked Perl as the language of choice for content management, interaction through CGI, and maintenance.
For the past two years, I've been working closely with Tom Phoenix in his role as lead trainer and content manager for Stonehenge, giving him charter to experiment with the "Llama" course by moving things around and breaking things up. When we had come up with what we thought was the best major revision of the course, I contacted O'Reilly and said "it's time for a new book!" And now you're reading it.
Some of the differences you may notice from prior editions:
The text is completely new. Rather than simply copy-and-paste from previous editions, we have derived the text from our Stonehenge "Learning Perl" courseware and the instructor notes we've created and road-tested. (Some of the exercises are similar to the originals simply because we were using the prior editions as our textbook until recently. But even those have mutated during the rewrites.)
We've broken the hard-to-swallow-all-at-once regular expressions section into three easily digestible sections.
We've created exercises with both Unix and Windows in mind.
We got rid of the artificial "control structures" chapter, moving the while and if statement earlier, and the foreach and for loops later. This gives us more useful examples and exercises for the scalars chapter, for example.
We moved subroutines much earlier to permit subsequent exercises to use subroutines for the questions and answers.
We now teach element syntax before the aggregate syntax for both arrays and hashes. This has worked a bit of a miracle in the classrooms, since it nearly always keeps beginners from the all-too-common mistake of writing a slice where they mean an element. At the risk of hubris, we'll admit that we expect other Perl instructors and books to follow our lead here.
The exercises are more real-world and better paced.
We've included information on use strict, warnings, and modules, although mostly as pointers for further information.
We've made the book much less addressed to the Unix system administrator, and much more to the general programmer. The phrase "like C" has been nearly completely eliminated.
The jokes are better. (We're constantly improvising jokes in the classroom, and some of these end up as part of the standard Stonehenge script. The best of those ended up here. You should see what didn't make the cut!)
We deeply regret that this edition lacks the wonderfully witty Foreword, written by Larry Wall, who was busy defining Perl 6 as we went to press. Larry is always supportive of our efforts, and we know that he's still part of the book in spirit, if not in word, to wish you the best as you start your holiday in the lustrous land of Perl.
Copyright © 2002 O'Reilly & Associates. All rights reserved.