Note that you can do:
local $hash{$key} = 1; local $array[$index] = 3;
Since foreach() works a lot more like local() than my(), there is no reason why it should not work, other than the fact that it currently does not. Somebody suitably motivated could make a patch to get this to work, and with enough convincing, the perl5-porters may accept it into mainstream perl 5.10.
In reply to Re: Re: Re: Re: Surpised by foreach iterator limitation
by MarkM
in thread Surpised by foreach iterator limitation
by shotgunefx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |