If you are using Perl 5.10 maybe you want to rewrite your code to use a switch statement given/when for a better readability. It also helps you to extend the number of tests without adding more and more if statements.
See: Switch-statements
Comment on Re^3: Help Perl Program - I have compilation errors don't know where