in reply to if/elsif statement troubles

landonc,
Since Zaxo has already given you the solution, I can only add that if you do this sort of thing a lot, you might want to consider Switch. It is going to be built into Perl 6 and can save some typing on very large if/elsif/else strings of code.

Cheers - L~R

Replies are listed 'Best First'.
Re (2): if/elsif statement troubles
by VSarkiss (Monsignor) on May 09, 2003 at 22:04 UTC

    I wouldn't recommend Switch for anything other than experimentation. It's big, and goes through a lot of contortions to work its magic. Either use one of the techniques described in perlsyn or just wait for Perl 6. ;-)