Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

RE: I use return on a subroutine

by Maclir (Curate)
on May 29, 2000 at 01:37 UTC ( #15227=note: print w/replies, xml ) Need Help??


in reply to I use return on a subroutine

As a matter of "good programming practice", I always state an explicit return, like "return 1;", or "return $status_code;" to make it easier for the programmers that will follow on from me. As well, when a subroutine is performing a task with a number of tests - say a data validation exercise - having a return after each failure avoids incredible messy code. Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://15227]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2016-12-03 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (52 votes). Check out past polls.