#! /usr/bin/perl -w use Tk; use POE qw(Session); my $main = MainWindow->new(     -title => "Ein kleiner test" ); POE::Session->create( 'inline_states' =>       { '_start' => \&test       },          'args' => [ "hi" ], ); my $text = $main->Label(     -text => "Jede Sekunde eine neue Zahl",     -width => 10,     -height=> 10 )->pack(); sub test {     for (1..5) {         sleep(1);         $text->configure(-text => $_);     } } POE::Kernel->run(); MainLoop;