Use the /r substitution flag to work on a copy

How many times has this happened to you? You want to modify each element of an array so you send it through a map (Item 20. Use foreach, map, and grep as appropriate.). However, instead of your expected output, you only to get a bunch of numbers or empty strings back? For example, in this case, some digits got into the names of the cats and you want to remove them with a substitution: Continue reading “Use the /r substitution flag to work on a copy”

Perl 5.14 new features

The Perl 5 Porters released 5.14. By reading the perldelta51[34]* documentation, you can see what’s new in this maintenance version of Perl. David Golden, one of the Perl 5.13 release managers, put together what he’s calling the perldeltadelta, which is just the most interesting bits of the longish perl*delta files for Perl 5.13, the experimental track that led up to Perl 5.14. He’s covered most of the interesting bits. Continue reading “Perl 5.14 new features”