sub client_connect { my ( $ns, $from ) = @_; chomp($_=<$ns>); print "$from : $_\n"; my $mw = MainWindow->new(); my $t= $mw->Scrolled('Text'); $t->pack(-expand => 1, -fill => 'both' ); tie ( *TEXT, 'Tk::Text', $t ); print TEXT "$from\n\n$_\n"; $mw->destroy; close $ns; CORE::exit(); }