Some more info:
while exhibits the same problem as C-style for.
However, bare blocks are not affected.
next exhibits the same problem as redo.
I also came up with a concise, minimalistic problem definition:
Why do these two loops have different outputs?
{ print("norm: "); local $_ = 'fred'; for (; /./g ; print("<$&>"),1) { } print("\n"); } { print("next: "); local $_ = 'fred'; for (; /./g ; print("<$&>"),1) { next } print("\n"); }norm: <f><r><e><d> next: <><><><>
In reply to Re: Does redo create a new dynamic scope?
by ikegami
in thread Does redo create a new dynamic scope?
by brian_d_foy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |