in reply to Re^2: Appending backslash to a string
in thread Appending backslash to a string

Please note that you're replying to a 13-year old thread, you'll probably get better exposure by posting a new question in SoPW, following the advice in How do I post a question effectively? Anyway, tr/// only replaces single characters, you may want s///g instead (or in this case, s{}{}g to avoid Leaning Toothpick Syndrome). However, in my experience, an escape usually doesn't come alone (do you need to escape backslashes too?), so it would be much better if you told us why you need to escape slashes, perhaps there's a much better method than regexes that we would miss otherwise.