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.)
If rather than formatting bugs, you encounter substantive content errors in these documents, such as mistakes in the explanations or code, please use the perlbug utility included with the Perl distribution.