#!/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 { my $counter = 0; while (1) { $counter++; $win->configure(-title=>"$counter"); $win->update(); sleep(1); } return; } MainLoop;