Perl 5.20 is out and there are some nice syntax changes that make life easier for Perlers, along with some improvements that don’t require any work from you. Some of the features are experimental, so be careful that you don’t create problems by overusing them until they settle down.
You can download the Perl source from CPAN. For Windows, Strawberry Perl 5.20 is available now. The full details are in the perldelta
- Subroutine signatures (experimental)
- The
:prototype
attribute - Postfix dereferencing (experimental)
- Slices that return the indices too (“Key/Value Hash Slices”, which is going to be confusing to distinguish from “hash slices” when we talk about them)
- Fixes taint problems with locale
- The Standard Library is trimmed (CGI, Module::Build, find2perl, s2p, and a2p are gone)
- A
return
at the end of a subroutine is optimized away - Adjacent
my
declarations are combined - On the command line,
-F
implies-a
, and-a
implies-n
rand
has a internal generator so it’s not platform or library dependent