in reply to Re^2: array with s///g commandin thread array with s///g command
Because that mangles @array1 - $_ is aliased to each element from @array1 and the substitution clobbers the original value