Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Simple IF, IF, IF or ELSE

by VSarkiss (Monsignor)
on Jun 28, 2006 at 20:58 UTC ( #558148=note: print w/ replies, xml ) Need Help??


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.


Comment on Re: Simple IF, IF, IF or ELSE
Download Code
Re^2: Simple IF, IF, IF or ELSE
by GrandFather (Sage) 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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://558148]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2015-07-03 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (53 votes), past polls