It’s probably safe to say that Perl simply has no rule here, and that what you get back from a sub depends on implementation details of perl.Wouldn't it be more accurate to say that returning the value from the last expression in subs works fine. But statements (things like if, for, while) don't have values and return pretty much garbage?
In reply to Re^2: "last expression" quiz
by Anonymous Monk
in thread "last expression" quiz
by fxn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |