in reply to tr/// vs s/// The question.

Actually I've posted a snippet about this some time ago at http://www.perlmonks.org/index.pl?node_id=82539.

You can actually review the existing code and snippets sections before you post.