I love Perl. The beautiful friendship started blossoming recently. I remember a few years ago, before I got infected with Unix, I was always scared to death when confronted with Perl. But after half a year of meddling with Bash, GNU coreutils and regular expressions, I happened to look into an occasional Camel-smelling script and, much to my surprise, I was literally shocked by its beauty. Let me list my personal highlights.

Perl is like human languages.

open(FILE, "< $filename") or die "$filename could not be opened for reading.";

In Perl, there are many ways to express yourself to stress different things, like in human languages. Not like in German.

With everything from Bash and coreutils, without using any extra modules. In the little Hungarian calendar below, I open a filehandle for a pipe from another program, I use the command line arguments, I do string substitutions.

Default variable $_, especially when it’s not even written. Just like ogc (or vice versa).

Look at the code above. Guess what the s/// substitution is working on? Guess what is printed? Exactly. The hidden $_ variable, the result of the previous operation.

Variable substitution within regular expressions.

In my first ever Perl-script I came across some substitution problem where a part of the pattern to change was stored in a variable. I thought: How nice it would be to be able to put the variable into the regexp. I googled it. Of course it works.

$foo =~ s/(^.* )$variable$/$1$bar/;

And don’t tell me it’s unreadable…

Perl is available for Windows.

At the slightly brain-damaged company I work for, I can write small programs for slightly brain-damaged users. They don’t have to install Cygwin to run them, but Perl gives me the full arsenal of Unix.