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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |