Like HowStuffWorks on Facebook!

How Perl Works

Perl is a fairly straightforward, widely known and well-respected scripting language. It is used for a variety of tasks (for example, you can use it to create the equivalent of DOS batch files or C shell scripts), but in the context of Web development it is used to develop CGI scripts.

One of the nice things about Perl is that, because it is a scripting language, people give away source code for their programs. This gives you the opportunity to learn Perl by example, and you can also download and modify thousands of Perl scripts for your own use. One of the bad things about Perl is that much of this free code is impossible to understand. Perl lends itself to an unbelievably cryptic style!

This article assumes that you already know how to program (if you know the C programming language, this will be especially easy for you). Perl is easy to use once you know the basics. In this article, we're going to start at the beginning and show you how to do the most common programming tasks using Perl. By the end of this article, you will be able to write your own Perl scripts with relative ease, and read cryptic scripts written by others with somewhat less ease, but this will be a good starting point.

More to Explore