On Fri, Feb 02, 2001 at 02:29:26PM -0500, Kenneth Graves wrote:
> \n is a metacharacter, and does work in tr.  The metacharacters that
> encode single characters work in tr like they do in an interpolated
> strings.  The metacharacters that match multiple characters in a regex
> don't work in tr.  The problem is, my brain keeps insisting that
>       tr/thesechars//d;
> is "really" an optimized version of
>       s/[thesechars]//g; # or [theschar]
> and I keep trying to do
>       tr/\s//d; # doesn't eliminate whitespace

Consider, however, the confusion that would result from:

tr/\s/\S/;

:)

Ronald

Reply via email to