>> The spec on the project is that the server close and regenerate the socket after each client is finished sending data, but it never happens. The client sends, and the server just sits.
The problem is that the in the while(<$client>) loop the server keeps on processing until EOF is recived from the client.
However from your definition the client sends data, and then waits for the connection to be closed (which won't happen until it sends EOF).
If the client were to close the connection after sending the server would stop trying to read from the client.
Otherwise you need to send a specific prearranged EOF marker (specific character or string that won't occur in the data part of the transmission).