I clearly said "in a Windows text file" in both of my posts.

Even in a Windows text file, newline is never simultaneously 1 character and two bytes.

I didn't read past this point in your rant, and I am done with you.

But such mistakes aren't a surprise when your reaction to a correction is to minimize your mistake and then to bury your head in the sand. :)

Confusion on these points is quite common and often leads to actual bugs (like in the head of this thread). Just go look it how many people are insisting that 'chomp strips "\r" characters'.

I think perlport does a great job of keeping this confusion high.

- tye        


In reply to Re^6: different length of a line from linux and windows textfile? (heirs) by tye
in thread different length of a line from linux and windows textfile? by Microcebus

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.