After a year of development has been published the release of a new stable branch of the Perl programming language — 5.44. During the preparation of the new release, about 270,000 lines of code were changed (excluding documentation and automatically generated code — 110,000), with changes affecting 860 files and involving 71 developers.
The 5.44 branch was released according to a fixed development schedule approved thirteen years ago, which stipulates the release of new stable branches once a year and corrective releases every three months. The first corrective release, Perl 5.44.1, is expected to be released in about a month to address the most significant bugs identified during the implementation of Perl 5.44.0. Concurrently with the release of Perl 5.44, support for the 5.40 branch has ended, and updates may only be released in the future for it if critical security issues are identified. The development of the experimental branch 5.45 has begun, based on which a stable release of Perl 5.46 will be formed in the first half of 2027, unless a decision is made to switch to the 7.x numbering.
Key changes:
- Added An experimental feature for using named parameters in signatures of functions allows defining the list of variables passed to the function not within its body but at its declaration. This new feature enables passing parameters in a non-strict order using key/value pairs and syntax similar to assigning elements in hashes:
- old syntax: sub f { my ($x, $y) = @_; …} f(1, 2);
- signatures: sub f ($x, $y) { … } f(1, 2);
- signatures with named parameters: sub f (:$x, :$y) { … } f(y => 2, x => 1);
- An experimental feature has been added that allows the use of aliases (pointers to pointers) in foreach loops with multiple variables. This feature enables the creation of an alias in a foreach loop while simultaneously extracting several values in one iteration of the loop. For example, you can create an alias for a hash element with an array while iterating over the keys and values of the hash at once: use v5.44; use feature qw( refaliasing declared_refs ); my %hash = ( one => [1], two => [2, 2], ); foreach my ( $key, @items ) ( %hash ) { say "The $key array contains: @items"; } # Before version 5.44, it would have been necessary to dereference: foreach my ( $key, $var ) ( %hash ) { say "The $key array contains: @$var"; } # Without the experimental features of refaliasing and declared_refs: foreach my $key (keys %hash) { say "The $key array contains: @{$hash{$key}}"; }
- In regular expressions is implemented an experimental mode ‘enhanced_xx’ has been introduced, allowing the use of the modifier /xx with character classes in square brackets ([a-zA-Z]) to split them across multiple lines or to substitute comments. For example, the condition if ($text =~ m/[a-zA-Z]/) can be formatted as: if ($text =~ m/[ a-z # lowercase letters A-Z # uppercase letters ]/xx) {
- In the pseudorandom number generator, the system call getentropy() is used to obtain entropy on systems that support it (Linux, BSD, macOS). On other systems, entropy is obtained by reading from the /dev/urandom device or using a hash of the time, process ID, and pointer value.
- Support has been added for the specification Unicode 17.0.
- Strict compliance with Unicode rules for identifier names and regex groups has been ensured, where about 160 Unicode characters that were previously classified as w are now prohibited. For instance, Latin letters within circles, which resemble real letters but are not, have been excluded from the w class that covers all letters, digits, and the underscore character. This behavioral change affects only programs using the use utf8 mode.
- Vulnerabilities caused by buffer overflows in the functions Perl_study_chunk (CVE-2026-8376), which manifests in 32-bit builds, and S_measure_struct (CVE-2026-57432), as well as a 16-bit counter overflow in the regex engine (CVE-2026-13221), which may lead to incorrect regex firing.
- Using the goto operator to jump to a position within loops and block constructs is prohibited. This capability was declared deprecated in 2010.
- Performance optimizations have been implemented, speeding up operations for addition, subtraction, and multiplication of integers, handling function signatures, and filling hashes from key/value lists with string keys known at compile time.
Source: linux.org.ru
