All i have a file and all the lines in the file which was created on windows, and is now on unix when i run the following.
while(<FH>){ printf("Found : $_\n"); }
When it prints out information it prints out the whole file as one line. ie
Found 1 06/02/23 11:16:05:390 Inbound:, Outbound:, Bidirectional:*** 2 06/02/23 11:16:05:390 Received FIX message Message dump: 3 06/02/23 11:16:05:390 Resetting FIX session intraday. 4 06/02/23 11:16:05:406 Sent FIX Message Message dump: 5 06/02/23 11:16:35:109 Sent FIX Message Message dump: 6 06/02/23 11:16:37:234 Received FIX message Message dump: 7 06/02/23 11:16:37:234 Sent FIX Message Message dump:
Is there a way to solve this.

In reply to File lines being treated as one. by minixman

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.