#!/usr/bin/perl use strict; use Tk; use threads qw(yield); use threads::shared; my $win = MainWindow->new(-title => "man"); my $t = threads->new(\&kind); sub kind {     sleep(3);     $win->configure(-title=>"dad");     $win->update();     return; } MainLoop;