|
Perl was created
by programmer Larry Wall. He wanted to have all the cool features
of other programming languages rolled into one,
and leave out all the useless functions. Perl stands for Practical Extraction
and
Reporting Language. CGI, or the Common Gateway Interface, is the means
by
which a Perl program, executed on the webserver, communicates with a client (i.e. a user with a web browser).
Learning how to
program in Perl is an essential skill that anyone wishing
to create advanced, interactive web sites needs to know. On the web
today, Perl powers
many web applications we all take for granted. Forms, search engines,
guestbooks,
electronic greetings, counters, automatic page generation, mailing lists,
and databases
are all made possible through Perl and CGI. When one has Perl and CGI
at their fingertips,
the possibilities are truly endless.
Perl is an interpreted
programming language, as opposed to a compiled programming language.
"Interpreted" means that a program written in Perl must be executed
by the
Perl interpreter every time it is run. In contrast, a program written
in a language such as C or C++
must be "compiled" once and then can be directly executed later.
Because Perl is
an interpreted language, it is quite easy to write a program, run and
test it,
modify it, run it again, and so on, because recompiling after each change
isn't necessary.
However, this can be a limitation, because it requires that the Perl
interpreter be present
every time the program is run. Most WWW servers have Perl installed,
though, so using
Perl for CGI is usually possible.
Lesson 2 - Basic Structure of Perl
|