Since emacs is being used why not using emacs' buildin serep function?

Macro:

M-<                     ;; beginning-of-buffer
M-%                     ;; query-replace
C-q                     ;; quoted-insert
C-m                     ;; newline
2*RET                   ;; newline
!                       ;; self-insert-command

Stefan

-----Original Message-----
From: _brian_d_foy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 5:46 PM
To: [EMAIL PROTECTED]
Subject: Re: perl script to remove control M's


In article <OFC37CFF55.39E829E6-ON86256B1A.004E73D7@com>, 
[EMAIL PROTECTED] (Brent Michalski) wrote:

> I always like to simply use:
> 
> perl -pi -e 's/\r//' <filename(s)>

you have to be careful with that though because it's not
portable.  \r means different things to different OSes :)

    perl -pi -e 's/\cM//' <filename(s)>
-- 
brian d foy <[EMAIL PROTECTED]> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to