by Leon Rosenshein

Wall Of Perl

Back in my Flight Simulator days I ran the build system. The build system supported about 15 developers, 20 testers, and 30 artists. We did daily builds and internal releases of code and content. No check-in builds, no automated unit tests. Code builds were easy. Fire up MSVC via command line with options and wait. If it failed send email to lots of people.

Content builds were a little different. We used 3DStudio Max for models and custom plugins for model export/processing. We had another custom tool to take textures (images saved in a lossless format) and convert them to pyramided DirectX texture files. And we had lots of models/textures. Around a terabyte of content source, and this was in the late 90's, so large for the time. The only way to make it run in a timely fashion was a distributed build farm (which were the artist's development machines during the day). And holding the whole thing together was a set of Perl scripts.

From the beginning Perl has always surprised me by how terse it is. Working with lists, whether modifying or just acting on them, is easy and (usually) clear. It has pretty close integration with the underlying OS, so acting on system resources (files usually) is straightforward. It's a procedural language, so it's familiar to most developers. It's strongly typed in that at runtime there is some enforcement, but it's loosely typed since there's no compile time checks and it can depend on your data to know if things really work.

Perl gets a bad wrap because there is lots of read-only perl code out there. Particularly since a big use of Perl is string handling, a lot of Perl code is replete with regular expressions, extracting data from strings and then using it to do something else. In the spirit of transparency I admit that I've written code in Perl, then come back the next day and been unable to figure out what I was doing, even knowing what I was trying to accomplish.

On the other hand, Perl is still amazingly powerful and useful. Larry Wall is the Benevolent Dictator For Life, and does a great job. Unlike other languages which went through a painful schism when updating to a new major version, Perl 5 is still the Perl, and what might have become Perl 6 has spun off into its own language and Perl continues to grow with active community support. There's even Perl being used in the NA toolset. So what's your experience with Perl? Share in the thread.