in reply to Regexp and backspaces...

The best way to simply remove backspaces is: tr/\b//d; Also see Removing characters.

Replies are listed 'Best First'.
Re: Re: Regexp and backspaces...
by merlyn (Sage) on Jan 17, 2001 at 04:28 UTC
    Oddly enough, \b in a regex is a word boundary, but in tr, as you show, it's a backspace. Good thing to bite beginners with.

    -- Randal L. Schwartz, Perl hacker