in reply to flushing sockets
You can read more about $| in the perlvar man page.
For a good introduction on buffering and Perl, I highly recommend Suffering from Buffering? by Mark-Jason Dominus.
- Matt Riffle