in reply to Re: "last expression" quiz
in thread "last expression" quiz
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: "last expression" quiz
by Aristotle (Chancellor) on Oct 20, 2005 at 02:34 UTC | |
by Anonymous Monk on Oct 20, 2005 at 14:24 UTC | |
|
Re^3: "last expression" quiz
by sauoq (Abbot) on Oct 20, 2005 at 04:44 UTC | |
by Anonymous Monk on Oct 20, 2005 at 14:33 UTC | |
by sauoq (Abbot) on Oct 20, 2005 at 16:07 UTC | |
by Anonymous Monk on Oct 20, 2005 at 17:15 UTC |