in reply to New behavior of 'each' with respect to references
Previously, each $hashref, or each \%hash, or even each { 'this' => 1 } would have been errors, and perl would tell you that.Errors? I'd say that Perl is now doing the right thing with each $hashref. Perl now DWIM is the same as my @a; $a[1] = 0; being legal. Or autovivifying and autodereferencing filehandles. Sure, someone, somewhere is bound to have made a mistake when he wrote open $fh, "<", "foo", but surely, the convenience of DWIM for all the others surely outweights that.
There isn't much in 5.14 that really excites me, but if I had to name one 5.14 I'd be using, it's the autodereferencing of arguments to keys, values and each.
|
|---|