in reply to Char replacement
Read your way through perlre, pay particular attention to s///, or post some code to poke into.
regards, tomte