This is documented behavior in "Foreach Loops" in perlsyn . A loop variable is an alias for every element in the list that loops. It doesn't look like a Perl link, but it looks a bit like a pointer if you think that each Perl variable is really a pointer that associates a name with a piece of data, and a piece of data can be found by more than one name - for example $x and $a[0] - at the same time.
hobbs source share