in reply to Re^2: array with s///g command
in thread array with s///g command

Because that mangles @array1 - $_ is aliased to each element from @array1 and the substitution clobbers the original value


DWIM is Perl's answer to Gödel