Perl
June 29, 2026 ยท View on GitHub
Perl is a legend of programming languages.
Easily one of the fastest easiest most powerful imperative scripting languages, and legendary for text processing and regular expressions.
It's the language of elite unix sysadmins, and much of unix tooling is built on it, including Git.
- PCRE - Perl Compatible Regular Expressions
- Core Reading
- Perl in-place fast file editing (like sed but more powerful)
- DevOps Perl tools
- Shell scripts with Perl
- Nagios Plugins in Perl
- CPAN / CPANM
- Libraries
- My Perl Library with Unit Tests
- Meme
PCRE - Perl Compatible Regular Expressions
PCRE has the gold standard of regex for decades and is the standard by which other languages are judged.
It's regex engine is faster and more advanced than Python's. You can see many examples where both are used in the following GitHub repos:
Bash / Grep style BRE / ERE - basic regular expressions / extended regular expressions are the poor man's version, and awkward for serious usage. Still, you can see many examples of Bash / Grep BRE/ERE format regex usage in:
Even if you don't know Perl programming you should at least in-place editing of files as it's even more powerful than sed.
Core Reading
Perl in-place fast file editing (like sed but more powerful)
perl -pi -e 's/OLD/NEW/g' *.txt *.yaml ...
DevOps Perl tools
Shell scripts with Perl
Shell scripts using Perl and making it easier to install Perl libraries from CPAN.
Nagios Plugins in Perl
CPAN / CPANM
CPAN was the original CLI tool to install libraries.
CPANM is a newer library installer that is preferred.
Libraries
You can search for libraries at cpan.org or metacpan.org.
Some of my favourite libraries you may find useful are below.
You can see most of these used throughout my GitHub repos, eg:
General
-
:package: Getopt::Long - Popular command line arg parser
-
:package: Data::Dumper - Print any Perl structure for easy debugging
-
:package: DateTime - Date and time object for Perl
-
:package: Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers
-
:package: Time::Local - Efficiently compute time from local and GMT time
-
:package: Math::Round - round numbers
-
:package: Digest::MD5 - MD5 hash algorithm
-
:package: Digest::SHA - SHA hash algorithm
-
:package: Template Toolkit - Template processing system
-
:package: Term::ANSIColor on CPAN - ANSI colors for terminal
-
:package: Net::DNS - popular DNS querying library
-
:package: Net::SSH::Expect - Execute remote SSH commands using Expect
-
:package: MIME::Base64 - Encode / decode base64 strings
-
:package: Email::Sender - Email sending library
-
:package: Sys::Hostname - Try every conceivable way to get hostname
Web
-
:package: LWP::Simple - easy to use HTTP(S) request library
-
:package: LWP::UserAgent - HTTP(S) request library with more power
-
:package: Net::HTTP - Low-level HTTP client
-
:package: JSON::XS - Fast JSON serializing
-
:package: XML::Simple - Simple XML parsing
-
:package: XML::Parser - XML parsing using Expat
-
:package: URI - Uniform Resource Identifier handling
Databases
-
:package: DBI - Database interface for Perl to access RDBMS databases
-
:package: DBD::mysql - MySQL database driver for DBI
-
:package: DBD::Pg - PostgreSQL database driver for DBI
-
:package: DBD::Oracle - Oracle database driver for DBI
-
:package: DBIx::Class - Extensible ORM for Perl
Testing & Logging
-
:package: Data-Faker - generates fake data for testing
-
:package: Log::Log4perl - Logging framework
-
:package: Test::Simple - Basic utilities for writing tests
-
:package: Test::More - More comprehensive utility functions for writing tests
-
:package: Test::Harness - Run Perl standard test scripts
Other
-
:package: File::Slurp - Simple file reading/writing
-
:package: Path::Tiny - Simple file path manipulation
-
:package: Try::Tiny - Minimal try/catch framework
More
Other popular libraries:
-
:package: Mojolicious - Real-time web framework
-
:package: Catalyst - MVC web framework
-
:package: Plack - PSGI compliant web application framework
-
:package: Dancer2 - Lightweight web framework
-
:package: Moose - Modern object system for Perl
-
:package: Mouse - Lightweight object system for Perl
-
:package: Crypt::OpenSSL::RSA - RSA encryption
-
:package: AnyEvent - Framework for asynchronous programming
-
:package: Parallel::ForkManager - Simple parallel processing manager
-
:package: SOAP::Lite - Client and server SOAP library
My Perl Library with Unit Tests
Meme
Ugly Code

Partial port from private Knowledge Base page 2009+