use Tk; my $mw = MainWindow->new(); my $text = $mw->Scrolled("Text", -width => 80, -height => 25)->pack(-expand => 1); $mw->fileevent(STDIN, 'readable', [\&insert_text]); MainLoop; sub insert_text { my $curline=; $text->insert('end', $curline); } #### open(FH,"tail -f -n 1 logifle") || die "Could not tail: $!";