Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

RE: I use return on a subroutine

by Simplicus (Monk)
on May 25, 2000 at 19:44 UTC ( #14781=note: print w/replies, xml ) Need Help??


in reply to I use return on a subroutine

As an old C/C++ coder, I probably use it more as a reflex than anything else. But I almost always use return
Simplicus

Replies are listed 'Best First'.
RE: RE: I use return on a subroutine
by Adam (Vicar) on May 25, 2000 at 20:09 UTC
    Yeah. I tend to use it more often then I don't. It makes the code more readable if you explicitly state what you are returning. But if my routine only returns an error state or the return value is irrelevant then I don't use return. (Its not like Perl knows about void functions)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2023-12-10 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (38 votes). Check out past polls.

    Notices?