in reply to side effects of map
The same thing will occur. The only thing that comes to mind as far as why this would happen is that two things are happening in both cases.foreach my $a (@$aref) { };
1) You're derefrencing the scalar as an array.
2) You're using a function that can modify the contents of that array.
In your other example, @$aref isn't modifiable. I personally wouldn't consider this a bug in perl. If you're going to access a refrence as an array, why is there a problem if it is an array?
Rich
|
|---|