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

Because tr is not a regex and doesn't take character classes. What you wanted is tr/A-Za-z0-9_ //cd Note the /c switch, which means "complement" and is the logical equivalent to a character classes ^ negation.

Makeshifts last the longest.