^M means you want to find a string that "start with M".
if you want to cut ^M as a space, maybe in this way;

s/\^M/ /g;

----- Original Message -----
From: "Brian N. Smith" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 31, 2001 4:42 AM
Subject: A little off topic, but still deals with CGI, just the results.


> When save to a file, I have a bunch of "^M" characters .. I wrote a little
> strip to try to get rid of them, but of course, I tried the ^M instead of
> whatever I should have had done ... any help?
>
> #!/usr/bin/perl
>
> open (myFile, "<in_file");
> open (myOut, ">out_file");
> while (<myFile>)
> {
>     s/^M/ /g;
>     print myOut $_;
> }
> close myFile;
> close myOut;
>
> That is what I have now ... what I should I actually be looking for?
> Obviously it is not the ^M, because it still exists.
>
> Thanks,
>
> Brian.
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to