Last Updated: August 5, 2022

What’s New in ActivePerl – Rollout of Features from Perl 5.12

Yesterday, we released our blog post Perl 5 is Alive, tracing the history of Perl 5 development and commenting on the continued commitment from the Perl community to Perl development.

A day after the release of Perl 5.12 by the Perl Foundation, ActiveState released ActivePerl 5.12. Based on Perl 5.12, this release contains a long list of smaller new features, bug fixes and some deprecations.

The Perl community proactively continues to contribute to the popular programming language, helping it maintain its status as a leading dynamic language option for enterprise developers. Several notable updates in ActivePerl 5.12 include:

New “package NAME VERSION” syntax

It allows you to set the module version right in the “package” statement at compile time, without having to assign to $VERSION at run-time. This makes the code more concise, and also makes it easier for other tools to extract the version number out of the source.

The “…” operator

The so called “yada yada” operator of Perl 6 heritage is a shortcut to mark unimplemented code:

if ($condition) { ... }

is the same as

if ($condition) { die "not yet implemented" }

Implicit “use strict”

An explicit request to require Perl 5.12 or later will automatically turn on “use strict”:

use 5.12.0;


use strict; use feature ":5.12";

Unicode improvements

Perl 5.12 now bundles Unicode 5.2. Perl now supports all Unicode properties for developers doing globalization work in multiple languages. The implementation has been improved to provide access to every Unicode character property, including the loose matching rules for property names, and definition of all Unicode-defined synonyms for property names and values. The “feature” pragma now supports the new “unicode_strings” feature:

use feature "unicode_strings";

This will turn on Unicode semantics for all case changing operations on strings, regardless of how they are currently encoded internally.

Y2038 compliance

The built-in date and time function now all work correctly past the year 2038 even when Perl is compiled with only 32-bit support. With previous versions of Perl for 32-bit Unix systems, it could only represent dates up to the year 2038, after which it wraps around back to 1970. It is especially important for financial services organizations that use Perl for applications such as mortgage and insurance contracts that run for 30 years or longer. This has been updated within the internal functions of 32-bit Perl 5.12.

qr overloading

It is now possible to overload how objects are turned into regular expressions when they appear on the right hand side of the =~ operator, or when they are interpolated into a regexp.

Pluggable keywords

The experimental keyword plugin mechanism allows extensions to cleanly hook into the Perl parser to define new kinds of keyword-headed expressions and compound statements. The syntax following the keyword is defined entirely by the extension. This feature facilitates the development of domain specific languages (DSLs) within Perl by allowing a completely non-Perl sub-language to be parsed inline, with the correct ops cleanly generated. The word “experimental” signifies that this feature may be changed significantly, or even be removed completely, in a future release of Perl.

Experimental \N regexp escape

The new \N regex escape works like the inversion of \n, matching any character that is not a newline, and (unlike the ‘.’ meta-character) is not affected by the “single line” regexp modifies /s.

Lots more

There are a lot more changes and bug fixes in 5.12, so please read the full perl5120delta document before upgrading.

Read the full ActivePerl 5.12 press release.

Learn more about major enterprise deployments of ActivePerl in the presentation “Take Quality Products to Market Faster with Enterprise-Ready Dynamic Languages” by Larry Backman, Vice President of Quality Assurance at CA, who uses ActivePerl to develop CA’s SiteMinder Web Site Access Manager, a product that enables secure access to web apps and sites.

Jan Dubois

Jan Dubois

Jan Dubois is a senior Perl developer who maintains Win32::OLE and is the technical lead for the Perl Dev Kit. Before joining ActiveState, Jan created innovative solutions for customers in the German banking and insurance industry. He holds a Masters Degree in Physics (Diplom-Physiker) from the University of Hamburg.