The
initServer subroutine's
while loop has no exit; your main program never gets past the
$server->initServer(); line. You'll need to make Server
and Client fork a child process to run
thosethat endless loop, or look into
IPC::Run,
Thread::Queue, or the many links above in the AnonyMonk reply.