Posted by brian d foy on March 28, 2010
Perl’s distribution system is quite powerful and supported by a variety of tools that can make life easier for you. Most people tend to think that “distributions” are synonymous with modules, but that’s only one of the uses for distributions. In Item 91: Write Scripts as Modules, we talk about the creating programs as “modulinos”, [...]
Posted by brian d foy on March 21, 2010
When you want to make a copy of a hash or an array, it’s not enough to merely assign it to a new variable name, at least in the general case: my @copy = @original; This is a bad habit that new Perl programmers pick up because they are only dealing with flat arrays: that [...]
Posted by brian d foy on March 14, 2010
People often reach for regular expressions to extract and rearrange information in XML documents. Those usually only work for the limited test cases people specifically target, but are really little time-bombs waiting to go off when the data or the format changes even slightly. The bomb often explodes after the original programmer has disappeared. It’s [...]
Posted by brian d foy on March 7, 2010
In Item 110: Compile and install your own perls, we showed you how to compile and install several versions of perl so that they don’t conflict with each other and you can use them simultaneously. Since they don’t install their programs, they are left in their $prefix/bin directories. With several perls, each of which has [...]