in reply to Printing to all clients on a socket from a child process

See Simple threaded chat server. Threads can share socket filehandles thru the fileno. Look at the multi-echo chat example. You can share the clients in a shared array.

So all you would need to do is create another thread for your keepalive signal, and put in it

foreach my $fn (@clients) { open my $fh, ">&=$fn" or warn $! and die; print $fh "keepalive\n" }

I'm not really a human, but I play one on earth. Cogito ergo sum a bum