Half My Life with Perl
Perl as a productivity and text‑processing tool
- Many describe Perl as a “superpower” for Unix text wrangling, one‑liners, and fast scripting, often replacing days of manual or multi-person effort.
- Strengths highlighted: tight integration with Unix/POSIX, powerful regex syntax, associative arrays, and the ability to solve complex text problems in very few lines.
- Some see Perl, awk, sed, jq, and bash as transformative for sysadmin/devops work compared to heavier general-purpose languages.
Ecosystem and CPAN vs modern package managers
- CPAN is praised as historically unmatched for breadth, obscure libraries, and “batteries included” feel.
- Others argue that Node/NPM and ecosystems around Python/PHP/JS have surpassed CPAN in current, business‑oriented libraries (APIs, modern file formats, data science).
- Concern that parts of CPAN are aging or unmaintained as early contributors move on, though Perl’s strong backward compatibility mitigates breakage.
Maintainability, readability, and culture
- Perl’s terseness and features (regex, implicit
$_, sigils, AUTOLOAD, etc.) are seen by fans as expressive and close to how humans describe tasks. - Critics stress readability problems, surprising semantics (contexts, references, filehandles), Unicode pitfalls, and “hieroglyphic” code that others rewrite rather than maintain.
- There’s a recurring debate about “lone-genius” productivity vs team maintainability, and pushback against elitist attitudes toward Python and mainstream tools.
What to learn now for CLI text processing
- Some recommend learning Perl as a “superset” of awk/sed; others suggest starting with awk because it’s smaller and easier.
- Several argue that today the gap is smaller: Perl might turn a 100‑line task into 1 line, but modern alternatives often do it in a few clearer lines.
- Python and Ruby are suggested when tasks grow beyond quick shell pipelines; tools like miller (mlr) are mentioned for structured data formats.
Language features and OO
- One side claims “it’s all regex”; others point to references, map/grep, pack/unpack, OO frameworks (Moose/Moo), functional patterns, and type systems.
- Perl’s OO is described as flexible but low‑level; higher‑level libraries make it powerful but also fragmented.
- Some features (e.g.,
given/when/smartmatch) are noted as deprecated, illustrating evolution and design reversals.
Web backends and modern usage
- Perl web frameworks (Mojolicious, Dancer, Catalyst, etc.) are cited as capable for APIs and apps.
- However, many see PHP/Ruby/Python frameworks as “miles ahead” in ecosystem depth (auth, validation, admin UIs, integrations), reducing Perl’s appeal for new web projects.
Longevity, ubiquity, and decline
- Perl is praised for scripts that keep running unchanged across OS upgrades, like a “solar calculator.”
- Counterpoint: some modern Unix systems no longer ship Perl by default; certain domains (e.g., ClickHouse drivers) lack up‑to‑date Perl libraries.
- Several note that enthusiasm is strongest among those who learned Perl in the 1990s; advice to “learn it while young” is reframed as mostly nostalgia and early‑imprint bias.