Thanks for the answer.
I know about print socket, but I need some generated data from other scripts on the server, to be sent to one of the clients which is connected to the server.
Look into using exec or system or some other format. Or something like named pipes (a simple block of text for example):
my $string = `date`;
print SOCKET "$string";
Though there are other considerations.
Someting that a lot of people need to realise is that sockets and files are no different (except for initialisation). You can read and write from a socket in the same way that you can from a file. If you understand files, treat them the same way.
Gits.