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


in reply to Re^2: tk mainwindow not appearing
in thread tk mainwindow not appearing

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.