Perl state variables

Perl 5.10 added a new class of variables ‘state’ that are similar to ‘my’ in scope but are only initialized once. Even inside of a subroutine a state variable will only be initialized on the first call to the subroutine and will maintain it’s last value between calls. A simple example is the easiest [...]

Perl 5.12 using each with arrays

As of version 5.12 perl now supports using each with arrays and hashes both. For our pm project we should get in habit of using it. No need to rewrite any old code.

In practice it’s very much the same as use with hashes. each still returns 2 results with the first one being [...]

Installing Perl under your home directory

The question of how to do a local install of PERL comes up now and then. The truth is it’s quite simple if you have a normal set of build tools installed. GCC, make, etc. I will walk through the steps here on doing the build and install.

Decide where you wish to [...]