in reply to Tk::repeat function

For this type of thing I usually use the cancel method at the start of the refresh sub, then recreate the timer at the end of the sub. Seems to work pretty well for me.
sub refresh_func{ $autorefresh_id->cancel(); #cancel the timer #.... do stuff ... $autorefresh_id = $root->repeat($rinterval*60000,\&refresh_func); +#recreate the timer }