>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

Reply via email to