On Fri, Nov 24, 2006 at 05:37:35PM -0600, JupiterHost.Net wrote:

> 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 

More than twice I think I'd expect some sort of loop.

> 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);

  do { one_then_two; return } if $whatever;

  one_then_two, return if $whatever;

  if ($whatever) { one_then_two; return }

  $whatever and one_then_two, return;

or maybe the return is conditional:

  return if $whatever && one_then_two;

  $whatever and one_then_two and return;

or maybe you want to return a value:

  return one_then_two if $whatever;

or any of a number of variations.

> # 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...

nah

-- 
Paul Johnson - [EMAIL PROTECTED]
http://www.pjcj.net

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to