… and back to Perl

For the last five years, roughly, I’ve been doing PHP programming, gradually forgetting the Perl that I knew, except when I wished PHP would do something that Perl makes easy.

One particular syntax I missed on an almost daily basis was:

foo( ) unless $bar;

It was therefore with some trepidation that I started on my new project, which uses Perl, mod_perl, and a heap of CPAN modules that I used to be very familiar with, but have, I thought, forgotten.

I’ve been very pleased to discover that I haven’t forgotten it, although some of it is pretty rusty. Perl’s use of different variable sigils ($, @ and % to denote different variable types) was welcomed back like group of old friends of whom you have fond memories, but sometimes confuse their names. If you know what I mean.

But it’s all coming back to me, and the various Perl colloquialisms are springing to my fingers.

I think that my years in PHP have benefited me, but I’m not very clear just yet in what way. The ability to jump back and forth between languages can make you perpetually confused, or it can make you stronger in both, depending on your approach. One hopes that you can learn something from the one to take back to the other, but that doesn’t always work out.

I am reminded on a regular basis, by support email, that I have a bunch of modules on CPAN which have largely languished while I’ve been in PHP-land. Of course, many of them have been superseded by better modules while I’ve been away. The Date ones, in particular, have almost all been superseded by the Perl Datetime project, which, although I helped start, Dave Rolsky has been heading for several years now. Maybe, if I’m lucky, I’ll have an opportunity to resurrect some of those modules and start playing with them again. Non-gregorian calendars, and traditions about different dates have long held a fascination for me, and I’d like to play with that again.

But, meanwhile, I’m learning the slang again, and since I’ve missed a half-dozen releases of Perl, I’m sure that it does even more weird and wonderful things than I did when I was a common face around the Perl circles.