in reply to Re^2: Changing array by changing $_?
in thread Changing array by changing $_?

Nope.

foreach my $foo (@bar) { $foo .= 'ack' ; ... } ;
will affect the contents of the array just as surely as:
foreach (@bar) { $_ .= 'ack' ; ... } ;
To avoid this you need to:
foreach (@bar) { my $s = $_ . 'ack' ; ... } ;
or similar.

It's genuine Perl magic. Useful once you know it. A chunk out of your backside when you don't.