$SIG{CHLD} = sub {wait()}; #### } else { $line = ; print $new_sock "$line"; } #### chomp($buf); exit(0) if ($buf eq 'q');