What is the new core enhancement in Perl 5.34 about using blanks?

Perl is a widely used general-purpose programming language. It offers great services, including text manipulation, GUI development, and much more.

There were many enhancements from Perl 5.32.0 release and the 5.34.0 release. Click here for a full list of differences between the two versions.

The following are the core enhancements in Perl v5.34.0:

  1. Experimental Try/Catch Syntax
  2. qr/{,n}/ is now accepted.
  3. Blanks are freely allowed within and adjacent to curly braces.
  4. New octal syntax 0oddddd.

In this shot, let’s talk more specifically about one of the core enhancements in Perl 5.34.0: Blanks freely allowed within and adjacent to curly braces.

In Perl v5.34.0, it is acceptable to use blank spaces within and adjacent to curly braces. This means the new version allows Regular Expression (Regex) data to be written as \x{ AAC }.

All such places use Regular Expressions, such as:

  • \b{}
  • \g{}
  • \k{}
  • \N{}
  • \o{}
  • \x{}

as well as the Regex quantifier {m,n}, which now allows this kind of data declaration with spaces adjacent to curly braces.

This method is useful only in double-quotish contexts and regular expression patterns.

Another update included in the Regex quantifier allows the use of additional blanks before and after the use of a comma in a curly bracket.

For example, /x{ 1, 2 }/ includes the use of a comma and number along with a blank space.

New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved