A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Perl page! Here, you'll find a description of the language as well as a list of sample programs in that language.
This article was written by:
Just like normal, I took to Wikipedia to learn more about Perl.
As it turns out, Perl is actually a family of languages sort of like Lisp. However, Perl is mainly divided into two branches: Perl 5 and Perl 6. As you can probably imagine, Perl 5 will be the language we'll be using for this exercise. Perl 6 is actually a major deviation from the traditional language, so I'll probably do a separate tutorial entirely for that language.
At any rate, Perl is a multi-paradigm language, so we'll be diverging a bit from our functional trend in this tutorial. Instead, we'll be working with a language that resembles languages like Python or C.
In terms of features, Perl is a mixed bag, literally. That's because Perl draws its inspiration from several other languages including C, Lisp, and AWK. As a result, Perl supports associative arrays, lists, regular expressions, and first- class functions. In fact, modern Perl even support object-oriented programming.
As a fun tidbit, Perl differs dramatically from Python in terms of complexity.
In fact, the creators of Perl live by the slogan "there's more than one way to
do it." In contrary, the creators of Python prefer that "there should be one,
and preferably only one, obvious way to do it"
There are 18 articles: