cajun has asked for the wisdom of the Perl Monks concerning the following question:

I just downloaded Perl/Tk Chatterbox Client Chatterbox client. When I open the file in gvim, I see that each line is appended with ^M. I don't recall ever seeing this in any downloads from PM before, so I'm not sure if it is a problem with my browser (Mozilla) or the way I saved the file (file|save as|chatterbox.pl).

1) Is there something broken with that node, or broken with my method of downloading ?

2) Does anyone know how to search for ^M in gvim ?

Replies are listed 'Best First'.
Re: d/l code problem
by a (Friar) on Jan 30, 2001 at 10:43 UTC
    ^M is dos/win eol (cr or lf, which ever *nix doesn't have). vi would use Ctrl-VCtrl-M (Ctrl-V to start "special char next" mode, Ctrl-M for the special char), so:
    :1,$s/ctrl-VCtrl-M//
    would do it. Otherwise,
    perl -i -pe 'chomp; print "$_\n"' chatterbox.pl
    might also work.

    a (opus 100)

      PERFECT !! Thanks very much a. Your gvm solution worked fine !