#!/usr/bin/perl -w use strict; use Tk; my $mw = MainWindow->new(); my $b1 = $mw->Button()->pack; my $b2 = $mw->Button(-command => \&test )->pack; MainLoop; sub test { print "start"; $mw->update(); for my $i (0..10000) { if ($i % 20 == 0) { print "$i\n"; $mw->update(); } } print "thats it"; } #### ----------------------------------- --the good, the bad and the physi-- -----------------------------------