That's different from any other kind of control block, and thus surprising.
Furthermore, there's no way to return a value out of an arbitrary block (say, a do {...} block) other than the result of the last evaluated statement within it. That means there is no explicit "this is my value!" marker, and to stop early you have to put the rest of it around an if statement, or use a temporary variable, or somesuch.
With the block form of eval being used mainly as a "try" construct, rather than "define an anonomous sub and call it immediatly with no arguments", this doesn't really fit anymore.
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: return from eval
by MarkM (Curate) on Jan 22, 2003 at 22:42 UTC | |
|
Re: return from eval
by demerphq (Chancellor) on Jan 24, 2003 at 18:34 UTC |