use Tk; use strict; use warnings; my $mw = tkinit (-title => "test"); $mw-> repeat (3000, sub {fenster_generator ();}); MainLoop (); sub fenster_generator{ my $toplevel = $mw-> Toplevel (-title => "test..."); $toplevel-> focusForce (); }