in reply to CGI Design
Using hashes would allow you to simplify your code quite a bit. See Why I Hate Nested If-Else blocks for a bit more detail.