while (<$sock>)
Just means while the connection is open between the two machines. I send stuff back and forth between the two machines right up until the client machine sends "tail\n"
Then all of the data streams across the socket.
Sorry about the "send tail using File::Tail"
Not very clear. Hope the above clears it up. The client sends that command and the data starts pumpin'