in reply to Need help with program using Perl Tk

TGI is right on about avoiding sleep. However, since you are a beginner, I will say to use a "repeat" statement, instead of an "after". Essentially, they are the same thing, but repeat is a bit clearer for repetitive things, whearas after is usually used for a 1 time delay.
my $repeater = $mw->repeat( $update_rate, \&Refresh, $somedata); #later to stop it $repeater->cancel

I'm not really a human, but I play one on earth. Cogito ergo sum a bum