in reply to Re: Using regex in Map functionin thread Using regex in Map function
or better perhaps:
my @out = map {substr ($_, 0, -1) . 'x'} @in; [download]
Prints:
aaa bbb ccc => aax bbx ccx [download]