>Thanks Jay and Tom!  I added this little bit to my script:
>
>select (CHILD);
>$| = 1;
>select (STDOUT);
>
>and it worked just as I expected it to.  It's interesting, though,
>that I've been working with sockets a bunch through IO::Socket and my
>print statements seem to print to the socket stream immediately.  Is a
>good practice to set the autoflush to one for socket filehandles as
>well?


Currently the IO::Socket is auto-flushed,so you maybe don't need to flush it 
again.
When you write to/read from  a pipe,you can always use syswrite/sysread 
instead,since syswrite/sysread avoid the IO buffer in Perl (it's in C's stdio 
indeed).

--
Books below translated by me to Chinese.
Practical mod_perl: http://home.earthlink.net/~pangj/mod_perl/
Squid the Definitive Guide: http://home.earthlink.net/~pangj/squid/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to