On 12/20/2003 8:21 AM, David Inglis wrote:

I am reading in a csv file and it has a control character ^M at the end
of each line how can I remove these charaters, I have tried the following
and had no success.

$a=~s/\^M//;
$a=~s/^M//;


Any help appreciated thanks.




^M is the carriage return. Try s/\x0D//;


Regards,
Randy.


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to