Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re(3): Cleaning the Log

by Arien (Pilgrim)
on Sep 03, 2002 at 01:41 UTC ( [id://194664]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Cleaning the Log
in thread Cleaning the Log

I messed up pretty bad before, but nobody took advantage... -11!

perl -pe'1while s/.?\{BS\}//' file

— Arien

Replies are listed 'Best First'.
Re^4: Cleaning the Log
by Aristotle (Chancellor) on Sep 03, 2002 at 01:51 UTC
    You can get rid of one more. perl -pe's/.?\{BS\}//&&redo' file Update: actually, you one needn't escape the curlies. Another two more. perl -pe's/.?{BS}//&&redo' file

    Makeshifts last the longest.

      Fails on
      A{B}{BS}S}bout
      :-)

      Yves / DeMerphq
      ---
      Software Engineering is Programming when you can't. -- E. W. Dijkstra (RIP)

        Also the simple degenerate case of the user typing '{BS}', but then, so would any solution that didn't involve modifying the keystroke recorder!


        Well It's better than the Abottoire, but Yorkshire!
        perl -pe's/{BS}/\b/g;1while s/(^|.)\010//' file

        Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://194664]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2025-03-24 19:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (65 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.