At 11:21 AM 8/31/00 -0600, Tom Christiansen wrote: > >I want last, next, etc. to magically work where I want them to: I too want last to work in do loops. > > do { > > last if /booger/; > > ... > > } while ( ... ); > >Special cased for postfix modifiers, or generalized? If so, >what's the return value? If anyone cared about the return value from a broken do loop, we could always say it was undef. Or cook up some scheme where you could say last [LABEL] [retval] where retval could be recognized by being a reference or something obviously not a label. I dunno, maybe a last in a do block whose value is used by something should be a syntax error. We're talking about code like $x += do { $y = get_num; last if $y == 99; $y } while defined $y; right? *Shudder* -- Peter Scott Pacific Systems Design Technologies
- Re: The distinction between "do BLOCK whil... Tom Christiansen
- Re: The distinction between "do BLOCK ... Christopher J. Madsen
- Re: The distinction between "do BL... Jonathan Scott Duff
- Re: The distinction between "do BL... Christopher J. Madsen
- Re: The distinction between "do BL... Jonathan Scott Duff
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Christopher J. Madsen
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Christopher J. Madsen
- do BLOCK as inline sub? (was Re: "... Uri Guttman
- Re: The distinction between "do BLOCK while CON... Peter Scott
- Re: The distinction between "do BLOCK whil... Christopher J. Madsen
- Re: The distinction between "do BLOCK ... Peter Scott
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Chaim Frenkel
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Chaim Frenkel
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Chaim Frenkel
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "do BL... Chaim Frenkel