Perl Programming   «Prev  Next»
Lesson 7Perl is a language/ program
ObjectivePerl terminology used throughout the course.

Perl Language and Program

I get a lot of email that's intended for other people simply because the computer can not figure out that the sender did not mean to type bearnet.com as the domain part of the email address.
The address is wrong. I know it, and the sender probably knows it, too. It was just a careless mistake. But the computers take it all very literally.
Because computers tend to take things so literally, we need to learn to be specific when we communicate with each other about computers. That is, when I say to run the perl on your system, you may actually type the letters Perl with the following result:

$ Perl 
Perl: not found

The language is named Perl, but the program is named perl.
You wil need to know how I am using two more terms throughout the course. The link below displays a diagram of the perl interpreter.
Interpreter and Compiler

Perl Scripts

Perl programs are often called scripts because of its historical development as an extension of the Unix command-level command scripting notations. A Perl script consists of a series of declarations and statements with interspersed comments. A declaration gives the interpreter type information and reserves storage for data. Each statement is a command that is recognized by the Perl interpreter and executed. Every statement is usually terminated by a semicolon, and in keeping with most modern syntax, white space between words is not significant. A comment begins with the # character and can appear anywhere; everything from the # to the end of the line is ignored by the Perl interpreter.
Though the Perl language proper does not have multiline (block) comments, the effect can be achieved using POD(plain old documentation) directives that are ignored by the interpreter. POD directives begin with an = and can appear anywhere the interpreter expects a statement to start. They allow various forms of documentation and text markup to be embedded in Perl scripts and are meant to be processed by separate POD tools. A block comment can be made by opening it with a directive such as "=comment" and ending it with "=cut". All lines in between are ignored.

Perl Compile - Quiz

Click the Quiz link below to take a short multiple-choice quiz on what we've covered so far in the course.
Perl Compile - Quiz
In the next lesson, the structure of a Perl program and how to build a test bed will be discussed.