I wrote this in WIN to read a multiline .txt file line by line
<code
while((INFILE)) {print $_;} >
Which is straightforward and NOT in @List context!
In WIN it worked perfectly for years, when I copy&paste a word.doc or .docx text into a simple txt file to use as INFILE. But when I do the same in MAC, that is copying a word.docx text to paste in a simple txt file, the above code churns out a single line whatever the lenght of the original text! I added a linecount in both system: in WIN it counts the lines correctly wether in MAC the result is always 1 line only.
I would very much appreciate a solution to this problem, since I have hundreds of texts to churn with my routine that wraps HTML tag around each line.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.