#! /usr/bin/perl -w use Tk; use POE qw(Session); my $main = MainWindow->new( -background => 'white', -title => "Ein kleiner test" ); POE::Session->create( 'inline_states' => { '_start' => \&test }, 'args' => [ "hi" ], ); sub test { for (1..5) { conf($_); sleep(1); } } POE::Kernel->run(); sub conf { $main->configure(-title => $_[0]); } MainLoop;