27 June 2007

A string of pearls. Or a string in Perl?

Last week I went to Chicago for a class on Perl (that's Practical Extraction and Report Language). Interestingly, it turned out to be the most useful class I've taken in the past 5 or so years. I only wish I'd learned Perl sooner--I can think of all too many occasions when it would have come in very handy.

I found Perl to be a surprisingly intuitive scripting language. No need to mess with variable types or pre-defined parameter passing. I now know it's a language for people like me. As the instructor kept saying, "We are lazy. We're Perl programmers." Shortcuts everywhere! What started out as bunches of lines of code could always be reduced to something like:

while(<>) {
print;
}

That's a perfectly legitimate and complete script, fyi. $_ rocks. Plus, Perl has great concepts like chomping, slurping, slices, and "anonymous arrays." On some level it made me worry that I'll have to develop an appreciation for carbonated beverages (yuck) and junk food (okay, so I already have that appreciation) to understand the language at a deeper level.


Can't wait to put this dangerous knowledge to good use... :)

No comments: