use strict; #use mship; use Tk; my $host; $|++; my $mainwindow = new Tk::MainWindow(); my $text = $mainwindow->Scrolled( "Text", -scrollbars => 'se' )->pack( -expand => 1 , -fill => 'both' ); for ( 0 .. 53 ) { $mainwindow->update; get($_); } my $button = $mainwindow->Button( -text => "close", -command => sub{ $mainwindow->destroy() } )->pack(); MainLoop; sub get { sleep rand 3; my $remote_name = "remote: $_[ 0 ]"; my $stats= rand() > 0.5 ? "Up" : "Down"; $text->insert( 'end', "$remote_name is $stats\n"); }