in reply to Removing Control Characters

:%s/^V^M
oh, you meant perl...
perl -ibak -pe 's/\r//' README.DOS
Update: I actually wanted the title to be vi roolz, but it turns out you can't have html tags in titles, which meant that the title was munged. Fixed now.

Replies are listed 'Best First'.
Re: Removing Control Characters
by zigster (Hermit) on Feb 22, 2001 at 19:33 UTC

    OUTSTANDING!!!

    I love PM I really do, how did I not know about -i, what a cool and goovey flag. It is times like this when I just boggle at perl, how can one language be so versitile.

    Ignore my node later raj8 this is a far better way of doing what you want. Although I would recomend the $ in the regexp:

    perl -ibak -pe 's/\r$//' README.DOS

    --

    Zigster
Re: ttvi/tt Rooolzzz
by asmodai (Novice) on Feb 22, 2001 at 19:56 UTC

    Although most of the time you want to use:

    :%s/^V^M//g

    --Jeroen/Asmodai