Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

perlfunc:return

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

return

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

return



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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-09-11 06:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (11 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.