in reply to Switch statement?

"But I am yet a newbie to perl."

Allow me to be blunt, you probably interpreted the situation wrong. Perl syntax or switch syntax is not the big deal here (although it is wrong), by looking at the fact you thought switch was needed, I believe, what important, and seems to be missing here is the skill to analyze the problem, and the ability to come up the right algorithm.

I am not try to hurt your feeling, not at all, but rather point out your weak point, so you know what you need to improve. Pay a little bit more attention to that area, it helps.

But hey, with your couragement, no issue is unresolvable!

Replies are listed 'Best First'.
Re^2: Switch statement?
by husker (Chaplain) on Jul 19, 2004 at 19:58 UTC
    Since he's a newbie, he was probably unaware of hashes, which is the "Perl way" to address this kind of problem. Without hashes, you get to self-flagellate with arrays and switches.

    It's the fault of all the other languages that don't expose people to the concept of a hash.