Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 musing on the Monastery: (3)
As of 2014-09-24 05:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (246 votes), past polls