in reply to Removing chars from a word from an array

for my $i (0..$#array) { $array[$i] =~ s/x//g; }
Or take advantage of the fact that foreach aliases the counter variable to the actual element of the list with the following:
foreach (@array) { s/x//g; }
That can also be written as
s/x//g foreach @array;

Update: Due to distractions, I incorrectly read the OP's question.