The latest version of Perl, 5.26.0, has just been released.
Here's the changes since 5.24.1: perldelta.
I've been using 5.25.9 (developer release) for a while because I wanted the Unicode 9.0 support. This included new features now available in 5.26.0. A couple I particularly liked are:
This allows you to now write (after a couple of levels of indentation):
{ ... { ... my $boilerplate = <<~'EOT'; Boilerplate text ... EOT ... } ... }
Previously, without being able to add the tilde, meant code typically looked liked this (and the readability gains from indenting code were somewhat diminished):
{ ... { ... my $boilerplate = <<'EOT'; Boilerplate text ... EOT ... } ... }
While the '/x' modifier allows whitespace in most of a regex to improve readability, the '/xx' modifier allows whitespace in bracketed character classes also. This can be used to separate ranges and individual characters. As a quickly contrived example to capture the first and last character of strings starting with alphanumerics and ending with certain punctuation characters:
/^([A-Za-z0-9]).*?([!@#$%^&*])$/ / ^ ( [A-Za-z0-9] ) .*? ( [!@#$%^&*] ) $ /x / ^ ( [ A-Z a-z 0-9] ) .*? ( [ ! @ # $ % ^ & * ] ) $ /xx
It's been discussed here a few times recently, but also note: Removal of the current directory (".") from @INC
While I was writing this, I was also installing 5.26.0 (under perlbrew). I see it has already completed successfully: so that much works and, at least for me, didn't take very long.
— Ken
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Perl 5.26.0 Available
by vrk (Chaplain) on May 31, 2017 at 09:49 UTC | |
Re: Perl 5.26.0 Available
by Athanasius (Archbishop) on Jun 03, 2017 at 05:55 UTC |