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.
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. ;-)