in reply to Re: should this backspace removal code be done better?
in thread should this backspace removal code be done better?
tr/\b//d would probably be the most efficient form but s/\010//g will also do the job. What is with all the .\010 and while(1)'s in the replies?
$_ = "hello\b\b\b\b\b\b\hello\b\b"; tr/\b//d; print length($_), $/, $_, $/; __DATA__ 10 hellohello
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: should this backspace removal code be done better?
by BrowserUk (Patriarch) on Oct 05, 2003 at 15:19 UTC |