(seeker of solace strings successive sibilants....)

OK, I am writing to a filehandle which represents a socket. To get unbuffered I/O, as much as possible, I use:

for (my $pointer = 0; $pointer < length($write); $pointer++) { syswrite (WHOIS, $write, 1, $pointer); }

The first time around, this works fine. However, sometimes I need to do this again (I need to recurse to a more specific WHOIS server to get useful WHOIS data, if you must know). So, I call the function again. It appears to work fine (I have checked the return value of syswrite(), and got a suitable number of "1"s) but the raw WHOIS data then appears as if I have only written the first character of $write to the new filehandle.

1) Am I normal? What's going wrong?

2) Is there a way I can check the data that is actually being sent out? Cos maybe their server is just being weird with me. (Update: doesn't seem to happen with other servers than this specific one. But doesn't seem to happen if I only connect once to this specific server.)

dave hj~


In reply to syswrite strange behaviour on some systems by dash2

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.