Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer


by gods
on Aug 24, 1999 at 22:42 UTC ( #250=perlfunc: print w/ replies, xml ) Need Help??


See the current Perl documentation for return.

Here is our local, out-dated (pre-5.6) version:

return - get out of a function early

return EXPR


Returns from a subroutine, eval(), or do FILE with the value given in EXPR. Evaluation of EXPR may be in list, scalar, or void context, depending on how the return value will be used, and the context may vary from one execution to the next (see wantarray()). If no EXPR is given, returns an empty list in list context, an undefined value in scalar context, or nothing in a void context.

(Note that in the absence of a return, a subroutine, eval, or do FILE will automatically return the value of the last expression evaluated.)

Log In?

What's my password?
Create A New User
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2015-11-26 17:09 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (704 votes), past polls