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


in reply to Substitute values

tr/// only replaces characters for characters. It is very limited but faster than s/// for simple character replacing. s/// is a full blown regexp that can use all of perls various options for pattern matching and substitution. For example if all you wanted to do was replace all A's with Z's tr is the better choice: tr/A/Z/; tr/// can't even use case insensitive matching so to replace all 'A' and 'a' with 'Z' you have to do this: tr/aA/Z/; the only useful option with tr/// is the range operator: tr/a-z/A-Z/

For more information see the link

Click Here