Word for Mac seems to use a line ending character not recognized by perl. Unix/Linux and probably MacOS uses \n (LF, ascii 10) for line endings, Windows uses \r\n (CR/LF, ascii 13,10). Your Word for Mac seems to use something without any \n at all, maybe a relict from old MacOS9 ??

Anyway, if you really want to use Word for Mac and it doesn't have a switch to change its behaviour, you could change perls notion of what a line ending is by changing $/ before reading this file.

Just to be sure, you really did save as a text file and didn't only change the filename from bla.doc to bla.txt ?


In reply to Re: End of line issues when using Mac OS X 10.5 and Windows (for Mac) products by jethro
in thread End of line issues when using Mac OS X 10.5 and Windows (for Mac) products by Ninth Prince

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.