NAME

return - get out of a function early


SYNOPSIS

return EXPR

return


DESCRIPTION

Returns from a subroutine, eval(), or do FILE with the value of the given EXPR. Evaluation of EXPR may be in a 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 a list context, an undefined value in a 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.)