Perl (5.42)

This assessment applies the coupling account — coupling as access to a shared resource, and the coupling floor [1], [2] — and the knowledge-embodiment theorem [3]; the language is assessed against its official reference [4].

Snapshot Perl (5.42) — released 3 July 2025 · lifecycle current

Family Perl — shelf: Shells and Automation

The language’s work is to drive a system: issuing commands, processing text streams, and gluing other programs together. Some members are interactive command interpreters; Perl is not, and belongs by the work, not the mechanism. A shelf groups; it does not classify — the tags below carry every use, paradigm, and platform of this snapshot.

Trajectory 1.0 (18 December 1987 — first release) · 5.42 (3 July 2025 — assessed release)

Tags

Use — Web back end, Scripting

Paradigm — Imperative, Procedural

Lifecycle — Current

Memory — Reference counted

Typing — Dynamic

Resources

The language’s official entry points, and the documents that name the release this page assesses. A link marked this release pins the document to Perl (5.42); an unmarked link is the current reference for the language.

Landing page

Specification and reference

API documentation

Tutorial

Package registry

1 Assessment

This page assesses Perl in five parts: core coupling — what the language’s own constructs force; ecosystem coupling — what the surrounding platform, tooling, and community cost; engineering readiness — whether the artifact can be reproduced, verified, observed, worked in quickly, connected to other languages, and governed openly; the profile — the unscored facts a score cannot express; and the scoring detail — the mechanism marks and the arithmetic behind every score. A ✅ bullet marks a construct that helps. A ⚠️ or ❌ bullet marks a cost; the scoring model does not price every cost named here.

Core coupling 36.0/100 · Ecosystem coupling 72.3/100 · Engineering readiness 56.7/100

1.1 Core coupling

1.1.1 Type

  • ❌ No type system: Dynamic, weakly typed
  • ❌ TIMTOWTDI: “There’s More Than One Way To Do It” creates inconsistency
  • ⚠️ Sigils: $scalar, @array, %hash provide some structure
  • ❌ Context-sensitive: Same code behaves differently in scalar/list context
  • ⚠️ Moose: Object system add-on provides types, not core
  • ⚠️ A method call resolves on the run-time object: $obj->method looks the name up in the object’s class when the call runs, so a rename breaks a caller only at run time (T3)
  • ❌ Regular expressions: Write-only code, couples understanding to expertise

1.1.2 Construction

  • ❌ Bless: Primitive object system, bless {} is manual
  • ❌ Core class syntax is experimental: use feature 'class' provides a core object system, but the implementation is still experimental, so a project cannot rely on it
  • ⚠️ Moose/Moo: Modern OOP libraries improve this significantly
  • ❌ Hash-based objects: No encapsulation enforcement
  • ❌ Global variables: $_, @_, %ENV everywhere
  • ❌ **Implicit $_**: Default variable creates hidden dependencies
  • ❌ Package variables: Global state pervasive
  • ❌ Collection order is unpinned: the documentation states hash order is not the source’s, and Perl randomizes it per process to catch the agreement (C5)
  • ❌ One value, many names: references are first-class, and the language’s containers reach one structure through names the declaration does not count (C6)
  • ❌ require/use executes at load; a cyclic require yields a partially defined package (C8)

1.1.3 Memory

  • ✅ Reference counting: Deterministic deallocation
  • ⚠️ Cyclic references: Leak unless broken manually
  • ✅ Automatic: No manual malloc/free
  • ❌ The undeclared class has no catch: an interpreter crash (the documented memory-exhaustion and regex blow-up classes) ends the program outside eval’s recovery (Er6)
  • ❌ Reference counts leak loops; the cycle collectors are opt-in, a priced mitigation (M7)

1.1.4 Error

  • ❌ Die/eval: Exceptions not typed, eval catches everything
  • ❌ Return undef: Many functions return undef on error, silent failures
  • ⚠️ $!: Global error variable couples error state
  • ❌ Signatures declare parameters only: A sub’s signature does not state the errors it may raise, so the failure channel is invisible at the call
  • ❌ A fault ends the program: a thread die ends the process (documented in the threading manual); eval recovers frames, not units (Er5)

1.1.5 Concurrency

  • ⚠️ Threads: Available but discouraged, heavyweight
  • ⚠️ Fork: Process-based concurrency common
  • ❌ No modern concurrency: No async/await, no actors
  • ❌ Shared state: Manual locking, error-prone
  • ❌ A thread is an interpreter thread: Each one reserves an operating-system thread, so the program pays per task (K6)

1.1.6 Platform

  • ✅ No company owns the language: Perl 5 is released by the Perl 5 Porters under the Artistic License and the GNU General Public License, and no vendor controls it
  • ✅ The interpreter is portable: The same C source builds on Linux, macOS, the BSDs, Windows through Strawberry Perl, and OpenVMS
  • ✅ CPAN is vendor-neutral: The archive is mirrored worldwide and serves any Perl distribution, not one vendor’s package service
  • ✅ A base interpreter ships with most Unix systems: Many Linux distributions and the BSDs install perl as part of the base system, so a script needs no extra platform

1.1.7 Trade-offs (not coupling)

  • Regexes are woven into the grammar: Pattern matching is syntax rather than a library, which makes text handling concise and the language hard to read — a syntax decision, not a coupling mechanism
  • Sigils prefix every name: The leading $, @, or % encodes the noun in the identifier, a readability trade expressed in the name rather than in a type system
  • Scalars carry both a number and a string: The dual-valued scalar is why == and eq are separate operators, a convenience whose cost falls on every comparison
  • Backward compatibility is the default: Decades of behaviour remain in the language, and use strict and use warnings recover discipline one file at a time — a compatibility cost, not a forced dependency
  • The successor was released as another language: Raku was developed separately from Perl 5, so Perl 5 continues on its own line — a project decision, not a coupling

1.2 Ecosystem coupling

1.2.1 Performance

  • ⚠️ Interpreted: Slower than compiled, and the reference interpreter has no JIT
  • ✅ Regex engine: Very fast for text processing
  • ❌ Memory usage: Higher than C, lower than Ruby/Python

1.2.2 Ecosystem

  • ✅ CPAN: Comprehensive Perl Archive Network, massive
  • ⚠️ Aging: Fewer new modules than modern ecosystems
  • ⚠️ IDE support: Limited compared to modern languages
  • ✅ CPAN minus: Great dependency testing
  • ⚠️ Tooling dated: Perldoc, prove, but aging
  • ❌ An XS module binds to a Perl build: the C code compiles against one Perl’s headers and build flags [5] (Ec8)
  • ✅ Stored data crosses on a published promise: a Storable header carries the file format version, and a reading Storable defers croaking until it meets a data type it does not recognize [6] (Ec9)

1.2.3 Evolution

  • ❌ Perl 6 → Raku: Split into separate language
  • ⚠️ Perl 5 stable: Very conservative, few changes
  • ❌ Declining use: Community shrinking

1.2.4 Domain

  • ✅ Excellent for text processing: Regex, sed/awk replacement
  • ✅ Good for system admin: DevOps, automation
  • ⚠️ Web declining: CGI era passed, PSGI exists
  • ❌ Not for applications: Modern alternatives better
  • ✅ Bioinformatics: BioPerl still used

1.2.5 Learning

  • ❌ Steep: Sigils, context, special variables
  • ❌ Write-only code: Hard to read others’ code
  • ⚠️ Good docs: Perldoc comprehensive
  • ❌ Many gotchas: $_, context, references

1.2.6 Syntax

  • ❌ Sigils everywhere: $@% visual noise
  • ❌ Context sensitivity: Same code different results
  • ⚠️ Powerful: Can express complex logic concisely
  • ❌ Punctuation soup: Special variables like $!, $?, $@

1.2.7 Testing

  • ✅ Test::More: Good testing framework
  • ✅ Prove: Test runner works well
  • ⚠️ Debugger: Perl -d works but basic
  • ✅ Testing culture: CPAN requires tests

1.2.8 Security

  • ✅ Taint mode: Tracks untrusted data
  • ⚠️ Type confusion: Dynamic typing allows anything
  • ⚠️ Eval risks: Code injection if used carelessly
  • ✅ No memory bugs: GC prevents use-after-free
  • ❌ An overflowing integer is promoted to the floating NV type in place, silent (Q4)

1.2.9 Delivery targets

What ships from a producer to a consumer, and whether the interface across a release boundary is promised. Ec8 is present when one compiled target crosses with no promise.

Target Ships as Crosses a producer boundary Cross-release promise
CPAN distribution source no A distribution is built against the local Perl at install time
XS module compiled yes no — XS code compiles against one Perl build, and a shipped binary binds to that build [5]

1.2.10 Stored data formats

What the toolchain stores that outlives the program, and what the vendor publishes about reading it across a release boundary. Ec9 is present when one row carries a break: the reading promise published as broken, the writing direction published as unreadable elsewhere, or a break the probe harness has reproduced.

Stored format Reading promise Writing promise
Storable image — frozen data structures yes — Perl publishes the promise for Storable images: the header carries the file format version, the version number increments only when additional features that would confuse older versions of the module are added, and a reading Storable defers croaking until it meets a data type it does not recognize, so a file from a newer release opens on the current one [6] —

1.3 Engineering readiness

1.3.1 Reproducibility

  • ❌ Installs resolve from the CPAN index at install time; no lockfile exists by default. (Y1)
  • ❌ Dependency versions resolve per install unless a carton-style snapshot is adopted. (Y2)
  • ❌ The official distribution ships no toolchain pin; perlbrew is third-party. (Y14)

1.3.2 Supply chain

  • ❌ CPAN distributions carry no signed provenance by default. (Y3)
  • ❌ No advisory feed joins CVEs to CPAN distributions. (Y16)
  • ✅ PAUSE registers author namespaces, so CPAN names carry them. (Y4)

1.3.3 Observability

  • ❌ No tracing standard exists in the language. (Y5)

1.3.4 Feedback

  • ✅ The interpreter runs with no build step. (Y7)
  • ✅ The Perl debugger ships with the interpreter behind -d. (Y13)
  • ⚠️ Editor analysis rides third-party language servers.

1.3.5 Interop

  • ❌ The artifact runs where a perl interpreter is built and installed. (Y10)

1.3.6 Governance

  • ✅ The Perl 5 Porters run the language in the open; no vendor owns it. (Y11)
  • ✅ The perldoc reference set is public. (Y12)
  • ✅ The interpreter source is public. (Y19)

1.4 Profile

Unscored, and kept separate from every score on purpose. The profile records what a mechanism price cannot express: what a running program costs, how well a coding model and an agent work in the language, and whether a safety-critical path exists.

1.4.1 Energy and cost

What this axis asks: what does a running program cost in energy and time?

  • ❌ Interpreted by default: the slowest class in the energy and time benchmarks [7]; a causal re-analysis attributes most of the gap to execution time [8].

1.4.2 AI and agent readiness

What this axis asks: how well does a coding model and an agent work in this language?

  • ⚠️ Moderate training data: models write it competently, with measurable language-specific weakness [9].

1.4.3 Safety certification

What this axis asks: is there a certified or standards-qualified path to a safety-critical system?

  • ⚠️ No certified or standards-qualified path for safety-critical systems.

1.5 Scoring detail

1.5.1 Core coupling Dimensions

Dimension Mechanism Description Imposed by Present Weight
Type T1 dynamic no static check language ✅ −15
T2 weak static language — 0
T3 dynamic/duck dispatch language ✅ −8
T4 no sum types language ✅ −4
T5 no generics language ✅ −4
T6 no namespaces language ✅ −8
T7 type erasure/reflection language — 0
T8 operator overloading language — 0
T9 inheritance required for polymorphism language ✅ −4
T10 no null-safety language ✅ −8
T11 no module boundary language ✅ −8
T12 no effect tracking language ✅ −8
T13 async/sync colouring language — 0
T14 unchecked foreign boundary language ✅ −4
T15 chars are encoding units language — 0
Type cost −20.3 (−71)
Construction C1 global mutable state by default language ✅ −15
C2 no immutability by default language ✅ −4
C3 constructors coupled to allocation language — 0
C4 no constructor/validation language ✅ −4
C5 unpinned collection order language ✅ −4
C6 aliasing by default language ✅ −8
C7 undeclared control transfer language — 0
C8 no source-visible init order language ✅ −8
Construction cost −12.3 (−43)
Memory M1 manual deallocation runtime — 0
M2 GC non-deterministic pauses runtime — 0
M3 no RAII language ✅ −4
M4 no ownership model language ✅ −8
M5 uninitialized reads language — 0
M6 unchecked reinterpretation language — 0
Er6 uncatchable runtime fault language ✅ −8
M7 reference cycles leak runtime ✅ −8
Memory cost −8.0 (−28)
Error Er1 no structured path language ✅ −15
Er2 unchecked exceptions only language ✅ −8
Er3 errors ignored/non-exhaustive language ✅ −4
Er4 no composable result type language ✅ −4
Er5 no isolation unit for a fault runtime ✅ −8
Error cost −11.1 (−39)
Concurrency K1 GIL/no parallel runtime ✅ −15
K2 shared mutable state default language ✅ −8
K3 manual sync no race detection runtime ✅ −8
K4 no structured concurrency language ✅ −4
K5 no primitives language — 0
K6 thread-per-task cost runtime ✅ −8
Concurrency cost −12.3 (−43)
Platform P1 cannot function outside one vendor/domain context — 0
P2 single-vendor but other uses context — 0
P3 legacy/discontinued platform context — 0
P4 poor domain fit context — 0
Platform cost 0

Core coupling score: 36.0/100 — 224 of the 350 inventory points are present, so the axis cost is 100 × 224 ÷ 350 = 64.0 and the score is 100 − 64.0. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

1.5.2 Ecosystem coupling Dimensions

Dimension Mechanism Description Imposed by Present Weight
Performance R1 interpreted no AOT/JIT runtime ✅ −8
R2 GC pauses runtime — 0
R3 JIT warmup runtime — 0
Performance cost −3.1 (−8)
Ecosystem Ec1 no package manager context — 0
Ec2 fragmented tooling context — 0
Ec3 small/niche/discontinued context — 0
Ec4 proprietary context — 0
Ec5 platform-locked tooling context — 0
Ec6 monoculture context — 0
Ec7 legacy burden context — 0
Ec8 unpromised binary boundary context ✅ −8
Ec9 unpromised data boundary context — 0
Ecosystem cost −3.1 (−8)
Evolution V1 breaking changes language — 0
V2 frozen context — 0
V3 discontinued context — 0
V4 glacial standards context — 0
V5 silent default drift runtime — 0
V7 build-variant state space context — 0
Evolution cost 0
Domain D1 domain/vendor lock-in context — 0
D3 framework forces architecture context — 0
Domain cost 0
Learning L1 steep context ✅ −8
L2 large surface/multi-paradigm context — 0
L3 sparse docs context — 0
Learning cost −3.1 (−8)
Syntax S1 verbose language — 0
S2 inconsistent language ✅ −8
S3 punctuation-heavy language ✅ −4
Syntax cost −4.7 (−12)
Testing G1 weak tooling context — 0
G2 poor debugging context — 0
G3 runtime-only errors context ✅ −4
G4 no published monotonic clock runtime — 0
Testing cost −1.6 (−4)
Security Q1 memory-unsafe language — 0
Q2 dynamic/weak typing risk language ✅ −8
Q3 known vulnerability/injection context ✅ −8
Q4 silent integer overflow language ✅ −15
Security cost −12.1 (−31)

Ecosystem coupling score: 72.3/100 — 71 of the 256 inventory points are present, so the axis cost is 100 × 71 ÷ 256 = 27.7 and the score is 100 − 27.7. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

1.5.3 Engineering readiness Dimensions

Dimension Mechanism Description Imposed by Present Weight
Reproducibility Y1 build not reproducible context ✅ −15
Y2 dependencies not pinned context ✅ −8
Y14 no toolchain version pin context ✅ −8
Y18 no machine-read project contract context — 0
Reproducibility cost −18.1 (−31)
Supply chain Y3 no signed provenance context ✅ −15
Y4 registry without namespacing context — 0
Y16 no advisory feed context ✅ −8
Supply chain cost −13.5 (−23)
Observability Y5 no stable tracing standard context ✅ −8
Y6 no structured logging context — 0
Y15 no post-mortem diagnostics runtime — 0
Observability cost −4.7 (−8)
Feedback Y7 slow build context — 0
Y8 no fast in-editor analysis context — 0
Y13 no bundled debugger context — 0
Feedback cost 0
Interop Y9 no foreign-function interface language — 0
Y10 no portable target context ✅ −4
Interop cost −2.3 (−4)
Governance Y11 single-vendor governance context — 0
Y12 closed specification context — 0
Y17 no conformance mechanism context ✅ −8
Y19 no published parser context — 0
Governance cost −4.7 (−8)

Engineering readiness score: 56.7/100 — 74 of the 171 inventory points are present, so the axis cost is 100 × 74 ÷ 171 = 43.3 and the score is 100 − 43.3. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.

Verdict: Perl is era before static analysis was common. TIMTOWTDI creates inconsistent coupling patterns. Context sensitivity couples behavior to call site. Implicit $_ creates hidden dependencies. Main strength: CPAN ecosystem, regex power, system administration tasks. Main weakness: “write-only” code couples maintenance to original author’s knowledge.


The formal development. The definitions, theorems, and proofs behind this page are published in:

All published papers

References

[1]
Y. Loth, “On the nature of coupling: All coupling as shared resource access.” Zenodo, Aug. 2026. doi: 10.5281/zenodo.21925121.
[2]
Y. Loth, “Coupling as a consequence of cohesion: Decomposition, the coupling floor, and domain-imposed coupling.” Zenodo, Aug. 2026. doi: 10.5281/zenodo.21925201.
[3]
Y. Loth, “On the nature of cohesion: Cohesion as correctness relative to a partitioning rule.” Zenodo, Jul. 2026. doi: 10.5281/zenodo.20492912.
[4]
Perl Foundation, “Perl documentation.” Perl Foundation, 2024. Available: https://perldoc.perl.org/
[5]
J. Orwant, “Perlmodinstall — installing CPAN modules.” Perl Foundation, 2026. Available: https://perldoc.perl.org/perlmodinstall
[6]
The Perl Repository Programming Group, “Perl documentation: Storable — persistence for Perl data structures.” The Perl Repository Programming Group, 2026. Accessed: Oct. 26, 2026. [Online]. Available: https://perldoc.perl.org/Storable
[7]
R. Pereira et al., “Energy efficiency across programming languages: How do energy, time, and memory relate?” in Proceedings of the 10th ACM SIGPLAN international conference on software language engineering (SLE), 2017, pp. 256–267. doi: 10.1145/3136014.3136031.
[8]
N. van Kempen, H.-J. Kwon, D. T. Nguyen, and E. D. Berger, “It’s not easy being green: On the energy efficiency of programming languages,” in Proceedings of the 40th IEEE/ACM international conference on automated software engineering (ASE), 2025. doi: 10.1109/ASE63991.2025.00131.
[9]
S. Joel, J. J. Wu, and F. H. Fard, “A survey on LLM-based code generation for low-resource and domain-specific programming languages,” ACM Transactions on Software Engineering and Methodology, 2025, doi: 10.1145/3770084.