Larry Wall is out to change the way we program, and he is well on his way towards succeeding. His "Practical Extraction and Report Language" (aka "Pathologically Eclectic Rubbish Lister") is a very powerful tool, and it is rapidly gaining converts.

I have become one of these, albeit reluctantly. As a long-time shell scripter on a variety of operating systems (RT-11, TOPS-10, UNIX, VMS), I could certainly see the utility of Perl. What I balked at was Perl's complexity and unblushing ugliness. (See the Perl man page for Larry's take on this...)

Maybe I was being unrealistic, but I was hoping to get away from the hodge-podge of syntax needed for UNIX shell scripting. Couldn't someone like Ralph Griswold or Dennis Ritchie craft the simple, powerful, and elegant scripting language we needed? Apparently not.

And it may be that Larry has done as well an anyone could have, given the range of idioms and capabilities he wished to include. Nonetheless, this Perl is indeed baroque, and Perl users simply have to accept the fact. Perl combines syntactic and semantic elements from AWK, C, sed, sh, and even (gasp) BASIC-PLUS.

It's definitely a kludge, but a thoughtful kludge. More to the point, it's a very addicting one for folks like me. I recoded a large production shell script into Perl. It went from three hours of run time down to about twenty minutes. It's also shorter and (to my eyes) easier to understand. I've had similar results with several other scripts.

Three major factors account for the speed-up. Perl runs as a single process, so it saves a lot on process start-up and context switching overhead. Perl is heavily optimized, so individual lines of code run quickly. Finally, Perl's many features encourage the use of efficient techniques.

How efficient is it? Tom Christiansen has a bet going with Rob Kolstad. Rob is supposed to find a C program that Tom can't recapitulate in Perl at no more than a factor of e (2.718...) penalty in run time. So far, Tom is winning. For many applications, such a penalty is more than justified by the benefits of using a convenient, powerful, interpretive language. Try Perl for yourself, and see if you don't agree...

Getting it

Larry's machine (ftp.netlabs.com) is the definitive site for the latest Perl source code. The official release is stored in ftp://ftp.netlabs.com/pub/outgoing/perl4.0/. Stay away from ftp://ftp.netlabs.com/pub/outgoing/perl5.0/ unless you're really up for alpha-level exploratory software.

You can also find Perl in ftp://ftp.uu.net/languages/perl/, ftp://prep.ai.mit.edu/pub/gnu/, ftp://archive.cis.ohio-state.edu/pub/perl/, ftp://src.doc.ic.ac.uk/packages/perl/ (UK), ftp://ftp.cs.ruu.nl/pub/PERL/ (Europe), and ftp://coombs.anu.edu.au/pub/perl/ (Australia), and ftp://sra.co.jp/pub/lang/perl/ (Japan).

In many of these same archives, you can also find collections of sample Perl code, reference material, etc. The largest archive of such material is ftp://coombs.anu.edu.au, which is mirrored on ftp://src.doc.ic.ac.uk.

Further Reading

Perl is fairly new, so there isn't much published literature. "Programming Perl" is definitive and entertaining, but not well organized for use as a reference. The other books listed below aren't in print yet, so I can't really advise you on them. "Learning Perl" sounds like an introductory work, and it is written by one of the authors of Programming Perl, so it should be quite accurate and entertaining.

  Learning Perl
  Randal L. Schwartz
  O'Reilly and Associates
  (due November, 1993)
  ISBN 1-56592-042-2

  Programming Perl
  Larry Wall, Randal L. Schwartz
  O'Reilly and Associates
  ISBN 0-937175-64-1
  ISBN 4-89052-384-7 (Japanese)

Johan Vromans maintains a Perl reference guide, which is available in LaTeX (source) and PostScript (ready to print) forms. The official kit includes both forms, and can be retrieved from ftp.cs.ruu.nl as /pub/DOC/perlref-*. Programming Perl includes a slightly dated version of the guide, printed as a glossy reference card.

With some effort, you may be able to track down some relevant articles. Larry Wall did a a 3-part article on Perl (Unix World, Aug-Oct, 1991). Rob Kolstad also did a 3-parter (Unix Review, May-Jul, 1990). Tom Christiansen did a brief overview article (Unix Technology Advisor, Nov, 1989). Gordon Galligher did "The Wisdom of Perl" (SunExpert magazine, Apr, 1991). ????? did "Perl: the Programmers Toolbox" (Computer Language, Dec, 92) Bruce Hunter has written some recent columns on Perl in Open Systems Today.

Much of the information in this article comes from Tom Christiansen's FAQ (Frequently Asked Questions) posting. This a gold mine of current information on Perl, and should be just about the first thing you retrieve. You can get in from the comp.lang.perl USENET group, or by FTP from ftp://convex.com/pub/perl/info/faq.