Perl Introduction

PERL Evolution

PERL stands for Practical Extraction and Report Language.

PERL was first developed by Larry Wall, a linguist working as a systems administrator
for NASA in the late 1980s, as a way to make report processing easier. Since its
invention PERL has grown significantly and is used popularly in automated processes
and an interface between different computer systems and a popular interface for CGI
programming in web.
PERL was a most convenient option for those comfortable with C programming for its
closeness to the syntaxes of C. Perl was originally designed for text processing and that’s
precisely the reason that it is the most popular language to be used for web applications.

PERL – Interpreted Language

Every PERL program is executed by a PERL interpreter which usually resides in
/usr/local/bin or /usr/bin directory in UNIX systems. The first line of a PERL program
usually contains the PERL interpreter to be used to execute that program (#! line). This is
useful if your machine has multiple versions of PERL installed.
#!/usr/local/bin/perl
PERL interpreter compiles the program internally into a parse tree and then executes it
immediately. Perl is commonly known as an interpreted language, but this is not strictly
true. Since the interpreter actually does convert the program into byte code before
executing it, it is sometimes called an interpreter/compiler.

Structure of PERL program

PERL programs contain a serious of statements with a first line indicating the interpreter
to be used to execute the program. All statements end with a semicolon. The statements
use PERL in-built functions and also user defined subroutines. It is straight forward and
doesn’t require a main() block like C.

No comments:

Post a Comment