Setting $| to 1 will turn off line buffering. Normally, a socket will wait until the buffer has filled
sending the data. This can be a source of trouble if the receiving socket is waiting and the data hasn't been sent yet. The $| = 1 simply eliminates the wait period before it sends.