Tom Christiansen writes: > >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. I realize that, and that's why 'last' & friends don't currently work in do loops. But programmers used to C expect 'do ... while' and 'while' to be almost equivalent, and I think most Perl programmers do too. (They may realize now that it's not true, but I still think it's what they originally expected.) Making 'last' work would cater to that expectation. Changing the way 'return' works is counter to it. -- Chris Madsen http://www.trx.com [EMAIL PROTECTED] TRX Technology Services (214) 346-4611
- Re: The distinction between "do BLOCK while CON... Tom Christiansen
- Re: The distinction between "do BLOCK whil... Bart Lateur
- Re: The distinction between "do BLOCK ... Tom Christiansen
- Re: The distinction between "do BL... Christopher J. Madsen
- Re: The distinction between "d... Jonathan Scott Duff
- Re: The distinction between "d... Christopher J. Madsen
- Re: The distinction between "d... Jonathan Scott Duff
- Re: The distinction between "d... Tom Christiansen
- Re: The distinction between "d... Christopher J. Madsen
- Re: The distinction between "d... Tom Christiansen
- do BLOCK as inline sub? (was Re: &q... Christopher J. Madsen
- do BLOCK as inline sub? (was Re: &q... Uri Guttman
- Re: The distinction between "do BLOCK whil... Peter Scott
- Re: The distinction between "do BLOCK ... Christopher J. Madsen
- Re: The distinction between "do BL... Peter Scott
- Re: The distinction between "d... Tom Christiansen
- Re: The distinction between "d... Chaim Frenkel
- Re: The distinction between "d... Tom Christiansen
- Re: The distinction between "d... Chaim Frenkel
- Re: The distinction between "d... Tom Christiansen
- Re: The distinction between "d... Chaim Frenkel