Linux Today: Linux News On Internet Time.

Byte.com: Learning Perl, Part 1

Feb 29, 2000, 04:00 (0 Talkback[s])
(Other stories by Martin Heller)

"Perl, variously expanded to "Practical Extraction and Report Language" and "Pathologically Eclectic Rubbish Lister," started out as a way for Larry Wall to generate some reports from a bug-reporting system running on Unix. Since then, like Topsy, it just "grow'd" - to the point that it runs on most operating systems, does almost anything you could reasonably want from a scripting language, and underpins a good fraction of the world's websites. Larry Wall is still Perl's chief architect, but Perl's development is now done by a committee. There are good reasons why the authoritative Perl reference is known as "The Camel Book," beyond the obvious fact that it has a camel on the cover."

"The second expansion of Perl given above is Larry Wall's own joke, and isn't totally a joke: Perl is nothing if not eclectic. Perl combines elements from C, Unix shells, awk, sed, and Wall only knows what else. It's sort of an interpreter and sort of a compiler: Perl scripts are distributed as source code, but the Perl interpreter compiles a whole script in memory before it executes any of it."

"Why would you want to learn Perl? One good reason is to write CGI scripts for websites; another good reason is to write system-administration scripts. You might want to learn Perl for the same reason Larry Wall originally wrote it: because you're lazy (that was my reason). Or, to be crass, you might want to learn Perl because good Perl programmers are considered pearls of great price. CPAN, the Comprehensive Perl Archive Network, holds the current Perl source and binary distributions as well as the documentation, contributed modules, and contributed scripts. The main CPAN ftp site is ftp.funet.fi, but unless you're in Finland it isn't the best site for you to use. Instead, you should use your Web browser to access the CPAN multiplex service at www.perl.com. Basically, the multiplex service routes any address starting with http://www.perl.com/CPAN/ to what it thinks is your nearest mirror site, based on your IP address. If you find that the multiplex service takes you to a site that doesn't perform well for you, you can select your mirror site manually at http://www.perl.com/CPAN (note the lack of a final slash)."

Complete Story

Related Stories: