I'm using ActiveState perl 5.1.8 on a Win2003 server box.
I had to parse a tab-delimited file created by Excel. Some of the cells in the spreadsheet contained LF characters. Each record was separated by CRLF. When I read the file with perl, it split the lines on LF, not CRLF as expected. $/ was LF, and if I changed it to anything else (CR, CRLF) it only found one huge record.
Even reading the whole file in and looking for CR failed to find any occurrences of CR. They seem to have been stripped out.
I know the CRs are in the file, as I can see them with a hex editor and notepad displays the records correctly. But if you open the file in Visual Studio, it has the same problem as perl and splits the lines on LF.
Any ideas, anyone?
I had to parse a tab-delimited file created by Excel. Some of the cells in the spreadsheet contained LF characters. Each record was separated by CRLF. When I read the file with perl, it split the lines on LF, not CRLF as expected. $/ was LF, and if I changed it to anything else (CR, CRLF) it only found one huge record.
Even reading the whole file in and looking for CR failed to find any occurrences of CR. They seem to have been stripped out.
I know the CRs are in the file, as I can see them with a hex editor and notepad displays the records correctly. But if you open the file in Visual Studio, it has the same problem as perl and splits the lines on LF.
Any ideas, anyone?