^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.