The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


perldelta - what is new for perl v5.35.5


This document describes differences between the 5.35.4 release and the 5.35.5 release.

If you are upgrading from an earlier release such as 5.35.3, first read perl5354delta, which describes differences between 5.35.3 and 5.35.4.

Core Enhancements

iterating over multiple values at a time

As of Perl 5.36, you can iterate over multiple values at a time by specifying a list of lexicals within parentheses. For example,

    for my ($key, $value) (%hash) { ... }
    for my ($left, $right, $gripping) (@moties) { ... }

Attempting to specify a list after for my was previously a syntax error.

For more detail see "Compound Statements" in perlsyn.

Incompatible Changes

There are no changes intentionally incompatible with 5.35.4 If any exist, they are bugs, and we request that you submit a report. See "Reporting Bugs" below.

Modules and Pragmata

Updated Modules and Pragmata

  • B::Concise has been upgraded from version 1.005 to 1.006.

  • B::Deparse has been upgraded from version 1.58 to 1.59.

  • Digest has been upgraded from version 1.19 to 1.20.

  • DynaLoader has been upgraded from version 1.51 to 1.52.

  • Encode has been upgraded from version 3.12 to 3.16.

  • Errno has been upgraded from version 1.34 to 1.35.

  • experimental has been upgraded from version 0.024 to 0.025.

  • File::Copy has been upgraded from version 2.36 to 2.37.

  • FindBin has been upgraded from version 1.52 to 1.53.

  • GDBM_File has been upgraded from version 1.20 to 1.21.

  • HTTP::Tiny has been upgraded from version 0.076 to 0.078.

  • I18N::Langinfo has been upgraded from version 0.20 to 0.21.

  • Module::CoreList has been upgraded from version 5.20210920 to 5.20211020.

  • POSIX has been upgraded from version 1.99 to 2.01.

  • Scalar::Util has been upgraded from version 1.56_001 to 1.60.

  • Test::Simple has been upgraded from version 1.302185 to 1.302188.

  • Tie::Handle has been upgraded from version 4.2 to 4.3.

  • Tie::Hash has been upgraded from version 1.05 to 1.06.

  • Tie::Scalar has been upgraded from version 1.05 to 1.06.

  • warnings has been upgraded from version 1.54 to 1.55.

  • XS::APItest has been upgraded from version 1.19 to 1.20.


Changes to Existing Documentation

We have attempted to update the documentation to reflect the changes listed in this document. If you find any we have missed, open an issue at

Additionally, the following selected changes have been made:


  • The election process has been finetuned to allow the vote to be skipped if there are no more candidates than open seats.

  • A special election is now allowed to be postponed for up to twelve weeks, for example until a normal election.


The following additions or changes have been made to diagnostic output, including warnings and fatal error messages. For the complete list of diagnostic messages, see perldiag.

New Diagnostics

New Errors

  • panic: newFORLOOP, %s

    The parser failed an internal consistency check while trying to parse a foreach loop.

New Warnings

  • for my (...) is experimental

    This warning is emitted if you use for to iterate multiple values at a time. This syntax is currently experimental and its behaviour may change in future releases of Perl.

Changes to Existing Diagnostics

Configuration and Compilation

  • The Perl C source code now uses some C99 features, which we have verified are supported by all compilers we target. This means that Perl's headers now contain some code that is legal in C99 but not C89.

    This may cause problems for some XS modules that unconditionally add -Werror=declaration-after-statement to their C compiler flags if compiling with gcc or clang. Earlier versions of Perl support long obsolete compilers that are strict in rejecting certain C99 features, particularly mixed declarations and code, and hence it makes sense for XS module authors to audit that their code does not violate this. However, doing this is now only possible on these earlier versions of Perl, hence these modules need to be changed to only add this flag for <$] < 5.035005>.


Tests were added and changed to reflect the other additions and changes in this release. Furthermore, these significant changes were made:

  • t/op/for-many.t was added

    This tests for looping of multiple values as the same time

Platform Support

Discontinued Platforms


Support code for Novell NetWare has been removed. NetWare was a server operating system by Novell. The port was last updated in July 2002, and the platform itself in May 2009.

Unrelated changes accidentally broke the build for the NetWare port in September 2009, and in 12 years no-one has reported this.

Platform-Specific Notes


Support for old MSVC++ (pre-VC12) has been removed

These did not support C99 and hence can no longer be used to compile perl.

Internal Changes

  • Memory for hash iterator state (struct xpvhv_aux) is now allocated as part of the hash body, instead of as part of the block of memory allocated for the main hash array.

    Nothing else changes - memory for this structure is still allocated only when needed, is still accessed via the HvAUX() macro, and the macro should only be called when SvOOK() is true. Hashes are still always of type SVt_PVHV, hash bodies are still allocated from arenas, and the address of the hash doesn't change, because the address is the pointer to the head structure, which never moves.

    Internally, a second arena (the arena with index 1) is used to allocate larger bodies with space for struct xpvhv_aux, the body "upgraded", and the "head" structure updated to reflect this (much the same way that the bodies of scalars are upgraded). We already re-purpose arenas - arena with index 0 is used for HE *s.

    None of this affects documented public XS interfaces. The only code changes are in hv.c and sv.c. As the rest of the core itself uses these macros but needed no changes, likely no code on CPAN will be affected either.

Selected Bug Fixes

  • Calling untie on a tied hash that is partway through iteration now frees the iteration state immediately.

    Iterating a tied hash causes perl to store a copy of the current hash key to track the iteration state, with this stored copy passed as the second parameter to NEXTKEY. This internal state is freed immediately when tie hash iteration completes, or if the hash is destroyed, but due to an implementation oversight, it was not freed if the hash was untied. In that case, the internal copy of the key would persist until the earliest of

    1. tie was called again on the same hash

    2. The (now untied) hash was iterated (ie passed to any of keys, values or each)

    3. The hash was destroyed.

    This inconsistency is now fixed - the internal state is now freed immediately by untie.

    As the precise timing of this behaviour can be observed with pure Perl code (the timing of DESTROY on objects returned from FIRSTKEY and NEXTKEY) it's just possible that some code is sensitive to it.

  • The Internals::getcwd() function added for bootstrapping miniperl in perl 5.30.0 is now only available in miniperl. [github #19122]


Perl 5.35.5 represents approximately 4 weeks of development since Perl 5.35.4 and contains approximately 32,000 lines of changes across 380 files from 22 authors.

Excluding auto-generated files, documentation and release tools, there were approximately 17,000 lines of changes to 260 .pm, .t, .c and .h files.

Perl continues to flourish into its fourth decade thanks to a vibrant community of users and developers. The following people are known to have contributed the improvements that became Perl 5.35.5:

Andrew Fresh, Chris 'BinGOs' Williams, Dagfinn Ilmari Mannsåker, Dan Book, Dan Kogai, David Mitchell, E. Choroba, Hugo van der Sanden, James E Keenan, Karl Williamson, Leon Timmermans, Matthew Horsfall, Nicholas Clark, Olaf Alders, Paul Evans, Ricardo Signes, Richard Leach, Sergey Poznyakoff, Steve Hay, TAKAI Kousuke, Tomasz Konojacki, Tony Cook.

The list above is almost certainly incomplete as it is automatically generated from version control history. In particular, it does not include the names of the (very much appreciated) contributors who reported issues to the Perl bug tracker.

Many of the changes included in this version originated in the CPAN modules included in Perl's core. We're grateful to the entire CPAN community for helping Perl to flourish.

For a more complete list of all of Perl's historical contributors, please see the AUTHORS file in the Perl source distribution.

Reporting Bugs

If you find what you think is a bug, you might check the perl bug database at There may also be information at, the Perl Home Page.

If you believe you have an unreported bug, please open an issue at Be sure to trim your bug down to a tiny but sufficient test case.

If the bug you are reporting has security implications which make it inappropriate to send to a public issue tracker, then see "SECURITY VULNERABILITY CONTACT INFORMATION" in perlsec for details of how to report the issue.

Give Thanks

If you wish to thank the Perl 5 Porters for the work we had done in Perl 5, you can do so by running the perlthanks program:


This will send an email to the Perl 5 Porters list with your show of thanks.


The Changes file for an explanation of how to view exhaustive details on what changed.

The INSTALL file for how to build Perl.

The README file for general stuff.

The Artistic and Copying files for copyright information.