in reply to Simple IF, IF, IF or ELSE

This is often called a "dispatch" or "case" or "switch" structure. You can find several suggestions for alternatives in the documents distributed with your perl:

perldoc -q switch

Update
You can also read the FAQ online.

Replies are listed 'Best First'.
Re^2: Simple IF, IF, IF or ELSE
by GrandFather (Saint) on Jun 28, 2006 at 21:16 UTC

    but note that using the switch module is frowned on. It's (by repute) a little buggy. The other sugestions in the link provided are generally to be prefered.


    DWIM is Perl's answer to Gödel