I knew that one Jon but thanks for looking it up for me.
What i need to know is if there is a way to do this without involving unix commands
like "perl" "sed" "dos2unix" etc etc.
I need to know if there is a simple way to do this with just php and not some regexp
I want to know if there is a built in function of some kind that will do this.
From: Jon Farmer [mailto:[EMAIL PROTECTED]]
Sent: den 5 september 2001 11:44
To: Johan Vikerskog (EMP); php_list
Subject: Re: [PHP] Carriage return.
> My php script is generating a file that is saved in Unix format.
> I automatically get the "^M" in the end of everyline. Is there a way
> of saving this without getting the "^M" in the end of each line?
/usr/bin/perl -npe 's/\r\n/\n/g' filename
will remove the Ctrl-M characters for you. You could call it straight after
the line that generates the file.
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]