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:

Indented Here-documents

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 ... } ... }
New regular expression modifier /xx

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


In reply to Perl 5.26.0 Available by kcott

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.