in reply to Advice on perl socket activity

Just to expand. Just open the socket using IO::Socket in non-blocking mode, and use select. select can take a timeout, so you can ensure you write your HELLO message at the necessary interval