my @out = map {substr ($_, 0, -1) . 'x'} @in;