From the docs for map: Note that $_ is an alias to the list value, so it can be used to modify the elements of the LIST. That explains why the original elements in @array change. $_++ modifies the element $_ and $_ * 2 doesn't modify $_.
In reply to Re: map confusion
by Cristoforo
in thread map confusion
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |