Category Archives: 5.12

Use each() on an array in Perl 5.12.

Before Perl 5.12, each only took a hash argument. In list context, it returns a two item list of a key-value pair you had not seen yet (unless you changed the hash in some way that re-ordered it): while( my( $key, $value ) = each %hash ) { … } This was quite useful for […]

Perl 5.12 new features

Perl 5.12.1 is out, which is the sign that it’s time for normal users to pay attention to it: that first point release should have sanded down all the rough edges. As usual, the complete list of major changes is in the perldelta5.12.0 documentation, we’ll cover some more of the interesting features in The Effective […]