Jeff, > Jenda, > > You CANNOT do what you are suggesting. My guess is that at one time it was allowable. If someone knows what version of Perl allowed loop control modifiers in do{ } blocks (or if they were never allowed) I would like to know. I am using v5.8.0 and I was surprised to try:
$ perl -e ' do{ print$i++, "\n"; last if $i > 5; }while ($i <10);' and see 0 1 2 3 4 5 Can't "last" outside a loop block at -e line 4. OK - I understand the error message. What I am curious about is why did perl proceed at all? Consider the following: $ perl -e ' > eval{ > do{ > print$i++, "\n"; > last if $i > 5; > }while ($i <10); > }' 0 1 2 3 4 5 Almost looks like eval is forcing a 'shut up and do what I meant' here... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]