in reply to Question about use of tr/ / / and s/ / /g

Yes. The terse explanation can be perused at perlop, but here is simple explanation in the meantime:

tr/// is the transliteration operator. It is used to convert all occurances of one character class to another:

tr/0-9/A-J/
s/// is the substitution operator. It replaces a pattern with some replacement string:
s/foo/bar/
The differences in the results can be subtle. A great explanation of when to use to which (don't rule out substr as a solution either) can be found at Code Smarter.

Jeff

R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--