$ perl -wE 'my $x = [qw{ab ac ad}]; say "@$x"; map { s/a/z/ } @$x; say "@$x"' ab ac ad zb zc zd