"José A. Ferrer" wrote:

> I have one program in linux that outputs DOS-like text format (with CR+LF)
> therefore when edited with "vi" a lot of ^M appeared.
> How can I filter this with perl ?

Few days ago someone asked about it on [EMAIL PROTECTED],
and that's what I wrote:

>> And for conversion, use this to convert Windows->Unix:
>> 
>>   perl -pe 's/\xd\xa/\xa/g' < windows-file > unix-file
>> 
>> And this for Unix->Windows:
>> 
>>   perl -pe 's/\xa/\xd\xa/g' < unix-file > windows-file
>> 
>> See also: perldoc perlport
>> http://www.perldoc.com/perl5.6.1/pod/perlport.html#Newlines

- RaFaL Pocztarski, [EMAIL PROTECTED]

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

Reply via email to