Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
laziness, impatience, and hubris
 
PerlMonks  

RE: I use return on a subroutine

by Maclir (Curate)
on May 28, 2000 at 21:37 UTC ( [id://15227]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://15227]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.