Well, I would normally have left the named array off and just done it with a simple scalar, but since the questioner is a newbie to perl, I wanted to show where the values end up when you use () and when you use just a scalar. I read a funny article in perl journal years ago (it was satire) in which the guy was supposedly using perl for military technology and forgot the () in the tolerances, so he was getting a "1" because it was the count of matches, rather than the value of matches.
Yeah, I find that interesting as well. Perl is amazing - thanks Larry!
I told a co-worker that I use perl everyday and he said "I hate that language" so I immediately lost all respect for him (haha).
You're right tr/// is better and more efficient. I sometimes use some old tricks because I have never had anyone actually teach me perl, just figured out by doing. I am now writing (most) everything object oriented in perl - which I hadn't before because I wrote most stuff very C-like.
Well, we are in the same boat, I never learned perl formally either. Last time i was in school I was learning how to write programs on punch cards. Which totally turned me off to programming for a very long time. ;)