Greetings monks,

My ongoing attempt at creating a PerlIO::via interface to an old module that I had laying around is actually getting somewhere. However, I've run up against a bit of a stumbling block.

The format that I'm trying to read is not new-line delimited, but is rather a 2-byte exclusive rdw format. What this means is that for every record, there are two bytes that prefix it that says how long that record is. I've written a subroutine that deals with this. When called from the old OO interface, it does as I expect it would: it returns one record. However, when I write a thin wrapper around it and call it as FILL (see PerlIO::via for details), it seems to be hung up looking for a newline character which may or may not be there. This causes the program to read in multiple records which is not what I want it to do. Is there any way to tell perl that "yes...even though there is no newline character at the end, you have the entire record"?

thor

Feel the white light, the light within
Be your own disciple, fan the sparks of will
For all of us waiting, your kingdom will come


In reply to PerlIO::via FILL subroutine question by thor

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.