Bill Jones wrote:
On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
The trick is I can't seem to goto() return in
do_some_stuff_and_return(), I'm sure since its so deep down...
I guess I'm totally confused; I don't see how a goto can return back
to the sub-rotine that called it:
perldoc -f goto
caller() and Export has a similar fiddleness
Look where its coming from:
#!/usr/bin/perl
use strict;
use warnings;
carp 'I am here';
foo();
sub foo {
carp 'I am in foo'; # line 13, so far so good...
}
sub bar {
baz('baz() called in bar()'); # line 17 *not* 22 where carp() was
goto()ified (E.g. actaully called)
}
sub baz {
local $Carp::CarpLevel = $Carp::CarpLevel + 1;
goto &Carp::carp;
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>