-- rada -- wrote:
>
> supposedly converts Windows CRLF to Unix LF:
> $str =~ s/\r\n/\n/g;
Perl sed function.
There's no need to use a regex function unless you have a regex pattern
to match. If you just need to remove the carriage returns, this will be
two or three times faster:
$str = str_replace("\r", "", $str);