Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: using switch

by thundergnat (Deacon)
on Sep 29, 2005 at 13:29 UTC ( #496095=note: print w/ replies, xml ) Need Help??


in reply to using switch

Your best bet is to avoid using Switch at all, especially in production code. It is very easy to introduce very hard to trace bugs and is just too fragile.

If you have a large number of possible branches use a dispatch table, otherwise, if-then-else (or ? : ).


Comment on Re: using switch

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2014-04-17 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (441 votes), past polls