http://www.perlmonks.org?node_id=852695


in reply to communication between server/client

Two common problems with client-server programming are

A cursory scan of your code seems to suggest that at least one of those problems is involved.