Christopher Fuchs wrote at Tue, 08 Jul 2003 14:29:50 -0700:

> I have a perl script on UNIX which works properly for an ASCII
> input data file which is in the form of:
> 
> record 1 line 1
> record 1 line 2
> record 1 line 3^M
> record 2 line 1
> etc
> 
> The record delimiter is ^M (which is sometimes refered to as CR or \r).
> When run on a Windows box, the ^M is stripped away and as a result
> the program fails.  I've tried all combinations of character strings for $/
> without sucess.  
> 
> How do I get Perl/Windows to keep the ^M so I can parse this?

binmode is your friend.
Please read
perldoc -f binmode


Greetings,
Janek

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

Reply via email to