The short answer to your question is that the way for and map alias $_ isn't orthogonal (map does a straight alias, for does magic). This behaviour is known about, so not really a bug. I think it's intentional DWIMery as it's idiomatic to modify the current topic ($_ in this case) in for whereas it's very bad form to modify the topic in map. Perhaps it's worth noting in the map docs this effect of aliasing an empty $_ makes it READONLY, but I somehow doubt it would be applied ala doctor, it hurts when I do this ....
_________
broquaint
In reply to Re: "Sparse" Array behavior with "for" and "map"
by broquaint
in thread "Sparse" Array behavior with "for" and "map"
by Excalibor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |