Writing threaded bi-directional socket apps is not going to be as simple as you write in your code. With moritz's fix, I can send from client to server, but no luck sending from server to client.... it silently crashes. I would also watch for memory gains if you do get those bugs worked out, see multithreaded tcp listener with IO::Socket and threaded TCP server problem and ChatServer