Hour 1. Getting Started with Perl

Previous Table of Contents Next

Hour 1. Getting Started with Perl

What You'll Learn in This Hour

  • Installing Perl

  • Accessing Perl's internal documentation

  • Writing your first Perl script

Perl is a general-purpose programming language. It can be used for anything that any other programming language can be used for. It has been used in every industry imaginable for almost any task you can think of. It's used on the stock market; in manufacturing, design, bioinformatics, customer support, quality control, systems programming, payroll, and inventory; and, of course, on the Web.

Perl is used in so many places because Perl is a glue language. A glue language is used to bind things together. You probably wouldn't want to write a word processor in Perl—although you could—because good word processors are already available. Writing a database, a spreadsheet, an operating system, or a full-featured Web server in Perl would be silly—but again, possible.

What Perl is good at is tying these elements together. Perl can take your database, convert it into a spreadsheet-ready file, and, during the processing, fix the data if you want. Perl can also take your word processing documents and convert them to HTML for display on the Web.

As a side effect of being a language designed to glue elements together, Perl is very adaptable. It runs under, at last count, about two dozen operating systems—and probably more. Perl's programming style is very flexible, so you can do the same things in many ways. Your Perl programs may look nothing like mine, but if they both work, that's okay. Perl can be a strict language when it needs to be, but it can also be forgiving to new sprogrammers if you want. It's all up to you.

Let me just clear up a few points. The name of the programming language is Perl. The name of the program that runs your programs, the interpreter, is perl. The distinction usually isn't very important to you—except when you're trying to start your programs; then it's always perl. Sometimes—but not here—you will see Perl written as PERL, probably because one explanation of Perl's name is as an acronym for Practical Extraction and Report Language. Nobody ever really called it PERL; it's too pretentious. It's just Perl to its friends.

By the Way

Many of Perl's features were "borrowed" from other languages. This borrowing gave rise, early on, to Perl's other acronym-expansion: Pathologically Eclectic Rubbish Lister.

    Previous Table of Contents Next
    © 2000- NIV