Language

Perl

First appeared
1987
Paradigm
Imperative, scripting
Toolchain
Perl 5.40.1
Container image
debian:trixie-20261027-slim + perl 5.40.1-6+deb13u1

Perl was created in 1987 by Larry Wall, a linguist working as a programmer, to pull reports out of text files more easily than shell scripts and awk allowed. Its regular expressions became the model most other languages copied, and in the 1990s it ran much of the early web, along with a great deal of system administration and, for a while, the Human Genome Project’s data processing. Its motto is “There’s more than one way to do it.”

Every variable name starts with a sigil that says what it holds: $ a single value, @ an array, and % a hash, Perl’s dictionary. The same array can be read in different contexts, so @values gives the list, while my $n = @values gives its length. Perl ships with a set of core modules, such as List::Util for sum, min, and max. Modules from CPAN, Perl’s package archive, aren’t installed here. Every program starts with use strict and use warnings, and the run script fails the run if Perl prints any warning.

Quirks

Concepts in Perl

Run the examples locally

You need Docker and Python 3. The harness builds the pinned container and runs every Perl example:

git clone https://github.com/qnixon/dswithx.git
cd dswithx
python3 harness/run_tests.py --language perl