#!/usr/bin/perl -wuse strict;
use Tk;
$| = 1; # Schreib-Buffer deaktivieren
my $mw = MainWindow->new();
my $frame_bottom=$mw->Frame()->pack( -side => "top" );
my $log = $mw->Text( -background => "white" );
$log->pack(
-side => "top",
-fill => "both" );
my $submitbutton = $frame_bottom->Button(
-text => "Go",
-command => \&PrintText,
-width => "20" );
my $exitbutton = $frame_bottom->Button(
-text => "Exit",
-width => "20",
-command => sub { exit; } );
$submitbutton->pack( -side => "left" );
$exitbutton->pack( -side => "left" );
MainLoop;
sub PrintText
{
while(1)
{
$log->insert("end", "Text");
}