Linux Today: Linux News On Internet Time.

Linux Gazette: Learning Perl, part 1

Jan 14, 2001, 17:12 (0 Talkback[s])
(Other stories by Ben Okopnik)

"If you've been using Linux for any length of time, you've surely heard of Perl; probably even run a number of scripts, perhaps without even knowing it. Programs like "inews", "mirror", "debconf", "majordomo", "sirc", and a host of others are written purely in Perl. Taking a quick "zgrep" through the "Packages.gz" file in the Debian distro tells me that 382 of the packages depend on Perl (meaning that a critical part of that package is written in it), and 28 other packages either suggest or recommend it...."

"Perl has been variously referred to as "A scripting language with delusions of full language-hood", "The Swiss Army Chainsaw of Unix", "The duct tape of the Web", and other equally, umm, complimentary names. It has been used to write single-line scripts, fast-executing programs, large projects (Amazon.com's entire editorial production and control system, Netscape's content management and delivery system, the Human Genome Project's DNA sequencing and project management, etc.), and millions of quick programs that do an amazing variety of things. Perl can also emulate a number of common Unix system utilities (hint: if you're looking at having to learn 'awk', 'sed', 'grep', and 'tr', I'd suggest starting in on Perl, instead. All the functionality, much faster, and you'll never outgrow the capabilities. Sure wish I'd known that, way back when...)"

"As you would expect of any modern language, Perl allows you to do object-oriented programming. It also handles networking (sockets, etc.), is highly portable (a well-written script will run on Linux, BSD, Solaris, DOS, Win9x, NT, MacOS, OS/2, AmigaOS, VMS, etc. without modification), and has a very short write/debug cycle - since there's no compilation required, you just write the changes and run the script. There's a tremendous wealth of modules (pre-built Perl routines) available to perform just about any task; the Comprehensive Perl Archive Network (CPAN) is one of the best resources a Perl programmer can have."

Complete Story

Related Stories: