Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: if else and not reachable coding style

by shotgunefx (Parson)
on Mar 08, 2006 at 13:40 UTC ( #535164=note: print w/ replies, xml ) Need Help??


in reply to Re: if else and not reachable coding style
in thread if else and not reachable coding style

I'd probably go this path myself (or the third example).

It really all depends on the conditions and the context the sub is used in.

More often than not though, I don't have subroutines that can return several values where "undefined" isn't a possibility. Usually that being the case, a bare return at the end becomes the trap.


-Lee
"To be civilized is to deny one's nature."


Comment on Re^2: if else and not reachable coding style

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2014-10-25 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls