This course is for anyone who needs a results-oriented introduction to Perl 5.
It is designed to give you a solid background in the Perl language, covering all of its major features and functions.
Perl was originally developed as a language to replace
awk
and
sed
in Unix system administration.
It has since become the defacto language for web programming as well, and today it is hard to find a system that is not using Perl for one purpose or another. Perl is a scripting language which means that it runs directly from the source code and there is no separate compilation process. But, it is not a strictly interpreted language either. The program
perl
actually compiles much of the source code into an
intermediate byte code which is then optimized before running. The effect is a language with many of the advantages of both interpreters and compilers. With its flexible syntax, rich regular expressions and full library of internal functions, Perl has allowed me to open up my creativity as a programmer. I hope it does the same for you.
- Perl History:
Perl was originally developed by Larry Wall in 1987 as a general-purpose Unix scripting language to make report processing easier.
Since then, it has undergone many changes and revisions. Perl 6, which began as a redesign of Perl 5 in 2000, eventually evolved into a separate language and both languages continue to be developed independently by different development teams.
The Perl languages borrow features from other programming languages including
- C,
- shell script (sh),
- AWK, and
- sed.
They provide powerful text processing facilities without the arbitrary data-length limits of many contemporary Unix commandline tools, facilitating easy manipulation of text files. Perl 5 gained widespread popularity in the late 1990s as a CGI scripting language, in part due to its regular expression and string parsing capabilities.
So you can start writing simple and effective Perl scripts as soon as possible, each of the lessons are short and direct,
giving you the rich features of the perl language that you now want to learn.
Perl was the language of choice before the advent of PHP. There are 6 modules and only the final module is Web-focused, explaining several example Perl programs useful for Web programming. The emphasis in Modules 1 through 5 is the Perl language.
In fact, even though Perl is native to the Unix-like operating systems, we have gone to great lengths to keep the examples as generic as possible so they will run on a wide variety of systems. Depending on your experience level, you can expect to spend 15 to 30 minutes on each lesson. Of course, you may want to spend more
time on some lessons and less time on others, so consider this number a rough estimate.
Over the next six modules, we will cover:
- What the Perl language is
- How to run a Perl program
- Variables and data types
- Perl operators
- Regular expressions
- Flow control
- Perl functions and subroutines
- Some common applications in Perl
Perl was originally thought of as a natural enhancement for the popular
csh shell script notation of Unix, Perl was at first primarily used for text manipulation. Its maturity in the early 1990s coincided with the rise of the Web, and it rapidly became the most popular programming language for HTML form processing and otherWeb development as well.
Perl has been called a "Swiss Army" knife for its features coupled with its considerable programming power and flexibility.
The common phrase among hardened Perl programmers is: "There is more than one way to do it." Most programming goals can be achieved in Perl in at least three ways, depending on which language features and techniques the programmer prefers to use. It is not uncommon for an experienced Perl programmer to reach for the manual when reading code written by another programmer. Perl has also been called "duct tape for the Web", emphasizing its utility for producing applications, Web sites, and general program fixes for a wide variety of problems and domains.
In this module we give a brief history of Perl, including major events preceding the creation of Perl that set the historical stage for
it. We provide an overview of the language, including example code to show how its features are used in practice. We discuss Web site programming in Perl using the
CGI (Common Gateway Interface) standard and show several database interface methods in Perl.
In the next lesson, some of the features of the Perl Programming Language will be covered. Then, the following two lessons will walk you through the steps of downloading
perl
and installing it on your machine.