Perl

A highly capable, feature-rich language excelling at text processing, system administration, and scripting.

Procedural
Object-Oriented
Functional
Intermediate
1987
Larry Wall

Overview

Perl is a family of high-level, general-purpose, interpreted, dynamic programming languages. Originally developed for text manipulation, it has grown to be used for system administration, web development, network programming, and bioinformatics. Perl's powerful built-in regular expression support makes it the "Swiss army chainsaw" of programming.

Key Features

  • Regex mastery — First-class regular expression support
  • CPAN — Over 200,000 modules
  • Text processing — Unmatched string manipulation capabilities
  • TMTOWTDI — "There's More Than One Way To Do It"
  • One-liners — Powerful command-line scripting

Code Example

perl
#!/usr/bin/perl
use strict;
use warnings;

my $text = "Contact us at info\@example.com or support\@nocturnal.dev";
my @emails = ($text =~ /[\w.+-]+\@[\w.-]+\.\w+/g);

foreach my $email (@emails) {
    print "Found: $email\n";
}

Learning Resources

Learning Path

11 topics across 3 sections

1Basics

2Data & Subroutines

  • Subroutines — sub, @_, return, and prototypes
  • References — Scalar refs, array refs, hash refs, and dereferencing
  • File I/O — open, read, write, and filehandles
  • Modules — use, require, Exporter, and CPAN module management

3Advanced

  • OOP in Perl — bless, method dispatch, and Moose/Moo
  • One-Liners — Powerful command-line text processing with perl -e/-p/-n
  • Text Processing — String manipulation, parsing, and report generation