Tom Phoenix 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...
Are you saying that you want a subroutine that can make the subroutine
that called *it* return? I'm not sure that that would make sense; and
it's not something that anybody's style guide recommends for normal
programming, since it leads to some ambiguous situations.
There's probably a better way to structure your algorithm. Or maybe
I've misunderstood your situation. Good luck with it!
Thanks Tom, I'll try to clarify.
In a function I can do this:
# stuff here
if($whatever, @ret) {
one();
two();
goto &CORE::return; # this is pseudo code that does not work but
illustrates the idea of the goal
}
# keep going since that function didn't return.
Say you have to do that expect same logic ten times, it'd be nice
instead of fifty of the exact same lines to have ten lines by do ing this:
# stuff here
do_one_then_two_then_return_if($whatever);
# keep going since that function didn't return.
Just need to figure you how to get the functionality that:
goto &CORE::return;
feels like it should do assuming I knew how to reference return...
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>