Introduction
Before Python was the default scripting language, there was Perl. Released in 1987, it powered the early dynamic web, system administration, and bioinformatics β and its motto, "there's more than one way to do it," made it the most expressive, and most notorious, language of its era. Perl is still running critical systems today, and its greatest gift to programming is one you use daily without thinking: regular expressions, which Perl made a first-class language feature.
Text processing, regex, and CPAN
Perl's model rests on a few distinctive ideas:
Text first β strings, files, and reports are Perl's home turf: slurp a file, transform it, print a report, in a handful of lines.
Regular expressions built in β pattern matching is not a library but syntax: =~ applies a regex directly, and Perl's regex engine set the standard others copied.
Context sensitivity β the same expression behaves differently in scalar and list context, which makes short scripts very short β and long programs harder toβ¦