in reply to Re^2: Invisible characters
in thread Invisible characters

Hi Lom Space!
I take it that Excel is running on your Mac that the Perl code is also running on the Mac?

There can be problems with transferring text files between: Mac,Unix and Windows because there are different "line termination" sequences. Mac uses \r, Unix \n, Windows \r\n so there can be some "weirdness".

Put the chomp(); in the code. I've found Perl to be pretty smart about dealing with line termination issues. I haven't seen Excel export a "weirdo character" when doing a text export. If you can "cat" the file, then Perl can read it. Put the chomp() in and then just print without any splits or whatever. That should work.

Now you may be exporting this spreadsheet as a .CSV file, which means "Comma Separated Value". Parsing this type of format is one of those things that appears easy, but is not so easy. There a number of Perl modules that deal with CSV but that doesn't appear to be your main problem. A CSV file is a text file.

Put the chomp() in and then just print the data lines and see if that works.