But what does 'return' evaluate to?When in doubt, don't consult Perlmonks. Read the documentation. Not only do you get your answer faster, it isn't buried between posts that don't answer your questions. It also doesn't require other people to read the documentation for you.
$ perldoc -f return return EXPR return Returns from a subroutine, "eval", or "do FILE" with th +e value given in EXPR. Evaluation of EXPR may be in list, scal +ar, 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 li +st in list context, the undefined value in scalar context, an +d (of course) nothing at all in a void context. (Note that in the absence of an explicit "return", a subroutine, eval, or do FILE will automatically return +the value of the last expression evaluated.)
In reply to Re^5: 'return:' instead of 'return'
by JavaFan
in thread 'return:' instead of 'return'
by Boldra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |