in reply to Same code different result in WIN and MAC, help please

I do nearly all my Perl on a Mac and it recognizes the EOLs just fine, and then runs fine when I deploy it on a FreeBSD system.

Are you using the same input data? Your file on the mac might not have any line breaks. Try looking at the source data with a text editor, and maybe post samples of the data files. It's probably some pathology of your data.

Edit:I think your source file has no line breaks. I just grabbed a random .docx out of my files and cut and pasted from word into bbedit. Each paragraph is one line, and the only line breaks are at the end of paragraphs. Word files (and I think most word processors) have always been this way. When you paste it into something on Windows, the editor probably inserts breaks. when you paste it into something on the Mac, it probably doesn't. Try using "save as" and (edit:then select "text") then check the box that says "insert line breaks". Or since you know the length of the lines (or can pick whatever you want it to be) just insert your own as needed.

  • Comment on Re: Same code different result in WIN and MAC, help please