You are viewing the version of this documentation from Perl 5.40.1. View the latest version

CONTENTS

NAME

perl5340delta - what is new for perl v5.34.0

DESCRIPTION

This document describes differences between the 5.32.0 release and the 5.34.0 release.

If you are upgrading from an earlier release such as 5.30.0, first read perl5320delta, which describes differences between 5.30.0 and 5.32.0.

Core Enhancements

Experimental Try/Catch Syntax

An initial experimental attempt at providing try/catch notation has been added.

use feature 'try';

try {
    a_function();
}
catch ($e) {
    warn "An error occurred: $e";
}

For more information, see "Try Catch Exception Handling" in perlsyn.

qr/{,n}/ is now accepted

An empty lower bound is now accepted for regular expression quantifiers, like m/x{,3}/ meaning m/x{0,3}/

Blanks freely allowed within but adjacent to curly braces

(in double-quotish contexts and regular expression patterns)

This means you can write things like \x{ FFFC } if you like. This applies to all such constructs, namely \b{}, \g{}, \k{}, \N{}, \o{}, and \x{}; as well as the regular expression quantifier {m,n}. \p{} and \P{} retain their already-existing, even looser, rules mandated by the Unicode standard (see "Properties accessible through \p{} and \P{}" in perluniprops).

This ability is in effect regardless of the presence of the /x regular expression pattern modifier.

Additionally, the comma in a regular expression braced quantifier may have blanks (tabs or spaces) before and/or after the comma, like qr/a{ 5, 7 }/.

New octal syntax 0oddddd

It is now possible to specify octal literals with 0o prefixes, as in 0o123_456, parallel to the existing construct to specify hexadecimal literal 0xddddd and binary literal 0bddddd. Also, the builtin oct() function now accepts this new syntax.

See "Scalar value constructors" in perldata and "oct EXPR" in perlfunc.

Performance Enhancements

Modules and Pragmata

New Modules and Pragmata

Updated Modules and Pragmata

Documentation

New Documentation

perldocstyle

This document is a guide for the authorship and maintenance of the documentation that ships with Perl.

perlgov

This document describes the goals, scope, system, and rules for Perl's new governance model.

Other pod files, most notably perlpolicy, were amended to reflect its adoption.

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 https://github.com/Perl/perl5/issues.

Additionally, the following selected changes have been made:

perlapi

perlcommunity

perldebguts

perldiag

perlfaq

perlfunc

perlgit