--- Maxim Berlin <[EMAIL PROTECTED]> wrote:
> Hello Curtis,
>
> Thursday, September 13, 2001, Curtis Poe <[EMAIL PROTECTED]> wrote:
>
> CP> That will show non-printing characters (-v) and the end of line will be
>indicated with a
> dollar
> CP> sign (-E). If you see a ^M before the end of line, you have saved the file in
>DOS mode. To
> fix
> CP> it, use an inplace edit:
>
> CP> perl -pi -e 's/\r//g' somescript.pl
>
> CP> Just be sure to back up the file first!
>
> -i does backup for you ?
(Ugh... sent this to the wrong list :)
The -i switch is for the "inplace edit". However, if you don't specify an extension,
it will not
create a backup. Here's how I might edit a file on my Win2K box:
perl -pi.bak -e "s/\n/\r\n/g" somescript.pl
That will backup somescript.pl to somescript.pl.bak. I should have pointed that out
in the first
place (in other words, I should have read the docs :).
Cheers,
Curtis "Ovid" Poe
=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]