Re: Removing ^M
| From: | Chris Knipe | Date: | Sat, 08 Jun 2002 17:45:20 +0000 |
| Subject: | Re: Removing ^M | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-101292@lists.php.net to get a copy of this message | ||
Perl apparently also works very nice for this
open (FILE, "filename"):
open (NEWFILE, "filename);
WHILE (<FILE>) {
chomp;
print NEWFILE $_
}
close (FILE);
close(NEWFILE);
this should take care of ^M
Kind Regards,
Chris Knipe
MegaLAN Corporate Networking Services
Tel: +27 21 854 7064
Cell: +27 72 434 7582
----- Original Message -----
From: "Michael Hall" <olc@ninti.com>
To: "PHP List" <php-general@lists.php.net>
Sent: Sunday, June 09, 2002 2:40 AM
Subject: [PHP] Removing ^M
>
>
> I am trying remove ^M characters (some kind of newline character) from an
> HTML file. I've tried all sorts of ereg_replace and sed possibilities
> but the
> things just won't go away. Does anyone have a way of removing such
> characters?
>
> TIA
>
> Mick
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>