Given that it is not repeatable on any other OS or even in a test case the two obvious fixes are to kludge it by stashing the value of tell() or to drop the use of IO::File. I have never been able to understand why people use a module that seems to me to be a totally useless use of OO to provide syntactic sugar. For the interested the offset drift is unusual in that it varies wildly and is nothing like common buffer sizes +/- a line.

11530000 11477968 = -52032 23064612 22977360 = -87252 34602683 34593093 = -9590 46134989 46040223 = -94766 57668448 57664020 = -4428 69205366 69145548 = -59818 80739978 80667412 = -72566 92271131 92205201 = -65930 103808049 103807699 = -350 115343814 115293110 = -50704 126879579 126807910 = -71669

I think graffs idea that you may be simultaneously be mixing calls that use/bypass stdio could be at the heart of the problem.

cheers

tachyon


In reply to Re: drifting IO::File offset by tachyon
in thread drifting IO::File offset by ezra

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.