in reply to Replacing double spaces (was: Reaplcing double spaces)
tr *translates* characters. So, in your example, each and every space becomes a pipe. You want a substitution, s/\s+/\|/. This says take each group of spaces (\s+) and replace them with a single pipe (\|). tr/ /\|/ says take each space *as an individual* and replace it with a pipe.
scott
|
|---|