Category Archives: 5.12

Watch out for side effects with `use VERSION`

To specify that you wanted to use at least a particular version of Perl, you specified that version with the use built-in: use VERSION; We covered this in Item 83: Limit your distributions to the right platforms, and we mentioned that it might invoke side effects. We didn’t get into the details in that Item […]

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 […]