Perl 5.42: A Classic Language Reinvented

watch 59s
views 2

14:15, 04.07.2025

In July 2025, the Perl community released Perl 5.42, the latest stable version in its long-running series. Staying true to its annual release schedule, this version follows Perl 5.40 (2024) and 5.38 (2023), bringing an impressive set of enhancements and internal refinements.

The scale of the release is significant: over 280,000 lines of code changed, across 1,500+ files, with contributions from 64 developers. While Perl 5.38 officially reached end-of-life (except for security patches), the first maintenance release, Perl 5.42.1, is expected within a month.

Looking ahead, development has already begun on Perl 5.43, which could evolve into Perl 5.44 — or potentially mark a shift to Perl 7.x in 2026.

From Smart Lists to Lexical Methods

Perl 5.42 introduces several thoughtful additions:

  • any {} and all {} operators: Efficient Boolean-style list checks, faster than using List::Util.
  • :writer attribute: Automatically generates setter methods for class fields.
  • Lexical methods + →& operator: Enables private method–like behavior, scoped to blocks.
  • New XOR assignment (^^=) and Unicode 16.0 support.
  • source::encoding pragma: Explicit source encoding declarations (e.g., 'utf8' or 'ascii').
  • Deprecated features like smartmatch (~~) and switch are now optional but supported.
  • Core namespace expands with functions like CORE::chdir().

Perl 5.42 may not be flashy, but it’s packed with smart evolution — proving that even a 35-year-old language can stay sharp.

Share

Was this article helpful to you?

VPS popular offers

Other articles on this topic

Rust 1.77 Announcement
Rust 1.77 Announcement
cookie

Accept cookies & privacy policy?

We use cookies to ensure that we give you the best experience on our website. If you continue without changing your settings, we'll assume that you are happy to receive all cookies on the HostZealot website.