Hmm, I did not think to use tr :
perl -ne '{print s/\cA//g, $/}'
s/to/from/g returns the number of replaced string. tr/x/y/ returns the number of characters replaced. In this case, tr/x/y/ will work, but you are looking for a string, not a single character, you will have problems.
Initially, although m/regex/g worked, it turned out that it returns only 1 or 0 . Drats.
source share