sub handle_incoming { my $w=shift; my $h=$w->fh; my $client=$h->accept or die; print "socket connection in...\n"; my $w = EV::io $client, EV::READ, \&handle_client; EV::loop; } #### sub handle_client { my $w=shift; my $h=$w->fh; $in=<$h>; $w->DESTROY unless defined $in; print "in=$in\n"; }