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


in reply to Tk events and a server socket

The part sub {&handler} doesn't look good.

Either use sub { statement } to embed a sub there or \&handler to refer to the sub called handler.

Now try again and tell us if things still go wrong :-)