This might be a windows only problem, but when I was testing sockets, I found I needed to do a check to $sock->connected during the select read loop. Read perldoc IO::Select and look for the "connected" method. If you check that before trying to read, you can let that client go, and find the new one that logged in. See
ztk-enchat encrypted server client for tricks like checking if the socket is connected, or sometimes, check if it's still defined.