(Note for downvoters: No, this is not your average "getting to know you" node - this is more of an example of how the Horrors of the Past can Come to Haunt You. =)
Tale of Truly Dusty Code
This is the first Perl script I remember having written:
# CoolFilter (c) Urpo Lankinen 26th Oct 1996
Yeah, it's a k00l wAR3z k1dd13 3mUl8tR. Handle with excessive sarcasm!
What it does? Well, it does this character mapping (Characters on upper line translate to corresponding character on lower. Lowercase characters are translated to uppercase characters.)
Problems with this one?
Ugh. No -w, no use strict; (Well, not using it in all of my scripts when I bloody well ought to), and seddish "y" instead of "tr". Grr. And while I aimed for self-containiness, I used the while loop when I could have used -p. And speaking of print, it uses redundant argument. Also, for locale independentness, uc operator would do better job at uppercasifying...
But it works. That's important. =)
This isn't (or maybe is) the first Perl program I've written; I wrote the first feeble scripts under DOS and Perl 4. The laptop's hard disk just died painfully once, before I had backed up everything... but don't worry, I lost interest completely when none of the stuff I tried to do worked and I couldn't understand any of the bundled library files. I'm more grieving the loss of the Turbo Pascal code...
I guess I picked up that construct from Perl 4 manual pages and then forgot it. Anyway, I started seriously learning Perl when I got Linux (in late summer 1996, I guess) and it had Perl 5. I didn't knew Perl well until summer 1997, when I got a copy of the Camel Book and realized how much fun Perl can be.
The rest, as they say, is history. =)
Funny sidenote: That same day, I wrote skibm2latin1.pl and sklatin12ibm.pl, two scripts to translate Latin-1 scandinavic characters to IBM codepage 437 and vice versa. I have used those scripts until this month [Sep 2000] when I finally installed Recode to handle this stuff. Speak of dusty code that gets used forever and ever without being noticed... Perl is Built to Stay. =)