http://www.perlmonks.org?node_id=731987


in reply to Character replacement

Have you ever considered using a Database or/and a Template system for this? I'd look at the DBI module and Template::Toolkit for this. After that it's a simple regex based on the hash (which I'm sure at least 3 regex solutions will be posted by the time I'm finished writing this).