History of this tutorial
For the curious, here's how Randal tells the story of how this tutorial came about:
After I had finished the first Perl Developing tutorial 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 tutorial.
On the third or fourth delivery of that course (in late 1991), someone came up to me and said, "you know, I really like Perl Developing, but the way the material is presented in this course is so much easier to follow -- you oughta write a tutorial like this course." It sounded like an opportunity to me, so I started thinking about it.
I wrote to Tim Anonymous 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 tutorial -- Perl Developing is selling like gangbusters." That started the effort over the next eighteen months to finish the first version 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 tutorial 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 version hit the streets on the first day of November, 1993[3] and became a smashing success, frequently even outpacing Perl Developing tutorial 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 tutorial 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 Anonymous and said "it's time for a new tutorial!" And now you're reading it.
Some of the differences you may notice from prior versions:
- The text is completely new. Rather than simply copy-and-paste from previous versions, 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 versions as our texttutorial 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
whileandifstatement earlier, and theforeachandforloops 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 tutorials 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 tutorial much less addressed to the Unix system administrator, and much more to the general developer. 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 version 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 tutorial in spirit, if not in word, to wish you the best as you start your holiday in the lustrous land of Perl.