saintmike has asked for the wisdom of the Perl Monks concerning the following question:
Why isn't goto &NAME working within an eval? For example, the following code snippet never seems to enter foo2().
If you leave out the eval, it starts working.foo( "a" ); sub foo { eval { goto &foo2; }; } sub foo2 { print "foo2 called with @_\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: eval and goto: no worky?
by ikegami (Patriarch) on Nov 09, 2010 at 22:57 UTC | |
by saintmike (Vicar) on Nov 09, 2010 at 23:02 UTC | |
by Anonymous Monk on Nov 09, 2010 at 23:10 UTC | |
by ikegami (Patriarch) on Nov 10, 2010 at 01:19 UTC | |
Re: eval and goto: no worky?
by BrowserUk (Patriarch) on Nov 09, 2010 at 23:22 UTC | |
by saintmike (Vicar) on Nov 10, 2010 at 02:09 UTC |
Back to
Seekers of Perl Wisdom