Unknown Sender wrote:

> W li?cie z wto, 26-08-2003, godz. 18:33, Jeff Zucker pisze:
>> Well, I thought so, and that's why AnyData works that way.  But CSV
>> worked with the "\015\012" default when I inherited it and there are too
>> many scripts out there based on that behaviour for me to contemplate
>> breaking backward compatibility.
> 
> Maybe
> 
> chomp $line;
> { local $/ = "\r"; chomp $line }
> 
> Would help to remove both \015 and \012, or only \012, or only \015 from
> the end of a line?
> 
> I use such construction in my scripts, because they can be 'fed' with
> files created in MS Win environment, as well as in Unix environment.


normally I use something along the lines of this: 

        s#\015\012|\015|\012#\n#

This ensures that whatever linefeeds the file contains are converted to
whatever your local system thinks of as 'normal' for \n. 

Then you can simply set csv_eol to "\n", and worry less about what OS the
original .csv came from. 

Reply via email to