What are the most interesting / useful things in Perl 5.12?

I remember how quickly adapted given .. when, say, //, and the operator smart matching, when there was a Perl 5.10.

What do you think are the most useful fixes and features introduced in Perl 5.12.0?

+5
source share
5 answers

This is my favorite feature:

use 5.012; # enables 'use strict' implicitly!
+5
source

while( readdir $dir ){} , while( readline $file ){}.

perl -MO=Deparse -e'while( readline $f ){}'
while (defined($_ = <$f>)) {
    ();
}

<$f> readline $f


Perl v5.11.2 while( readdir $dir ){}

perl-5.10 -MO=Deparse -e'while( readdir $d ){}'
while (readdir $d) {
    ();
}

, , 0. , .


5.11.2 Perl , while( readline $file ){...}.

perl-5.12.0 -MO=Deparse -e'while( readdir $d ){}'
while (defined($_ = readdir $d)) {
    ();
}

, I , . , - Perl. , , Perl.

+6
+3

, , Perl- Portable (-) ( ).

Perl 64- Windows GCC, 64- Strawberry Perl.

+3

All Articles