NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
It's not the subroutine, it's the block. (Score:1)
The fact that blocks return the last expression evaluated is what makes writing concise maps and greps.
Also note that whether a subroutine returns something or not is not determined by a return, or a last expression. Like anything else, it's determined by context. A subroutine will return nothing, if, and only if, it's called in void context. Otherwise, it will return something, even if it
Re:It's not the subroutine, it's the block. (Score:2)
-Dom
Reply to This
Parent