>Tom Christiansen writes: > > >However, I really don't want to see 'return' become a kind of 'last' > > >for do{}. How would I return from a subroutine from within a do loop? > > > > You already can't do that (as it were) from within an eval. >Yes, but 'eval' has the semantics "run this code but don't let it play >any funny tricks on me, like dying or anything", where 'do {...} while' >has the semantics "a while loop that evaluates its condition at the >end". There's no obvious reason why 'return' should behave >differently in a 'do while' loop than it does in a 'while' loop. I (well, Perl) really think of do{} much more as a construct that's kin to eval{} and sub{}. It just has a strange effect on postfix while/until checks, altering when they're consulted. --tom
- Re: The distinction between "do BLOCK while CON... Nathan Torkington
- Re: The distinction between "do BLOCK whil... Tom Christiansen
- Re: The distinction between "do BLOCK ... Bart Lateur
- Re: The distinction between "do BL... Tom Christiansen
- Re: The distinction between "d... Christopher J. Madsen
- Re: The distinction between &q... Jonathan Scott Duff
- Re: The distinction between &q... Christopher J. Madsen
- Re: The distinction between &q... Jonathan Scott Duff
- Re: The distinction between &q... Tom Christiansen
- Re: The distinction between &q... Christopher J. Madsen
- Re: The distinction between &q... Tom Christiansen
- Re: The distinction between &q... Christopher J. Madsen
- do BLOCK as inline sub? (was R... Uri Guttman
- Re: The distinction between "do BLOCK ... Peter Scott
- Re: The distinction between "do BL... Christopher J. Madsen
- Re: The distinction between "d... Peter Scott
- Re: The distinction between &q... Tom Christiansen
- Re: The distinction between &q... Chaim Frenkel
- Re: The distinction between &q... Tom Christiansen
- Re: The distinction between &q... Chaim Frenkel
- Re: The distinction between &q... Tom Christiansen