sub update_WorkingScreen_Progress { my $ratio = shift; #number like .32 means 32% my $new_percent = int ($ratio*100); #updating screen is expensive computationally #if number hasn't changed, then forget it... #let 0% go through first time if ( ($new_percent == $percent) && ($new_percent > 0)) {return;} $percent = $new_percent; $text = "Program is working - $extra_text...\n\n". "$percent percent complete\n"; $workingScreen->update(); #this is necessary for to #get the new value of $text to display!!!!! }