Foreach is a good solution as long as you don't assign the array as a whole like @myarray= map {$_, $_+1} @myarray;.
I don't exactly know what the consequences of that are, but it's illegal, and perl can't catch it. update: Removed comma after map{whatever}
In reply to Re: Re: use simple scalar names to point to specific array elements
by ambrus
in thread use simple scalar names to point to specific array elements
by Sandy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |