sub start_process{ my $count = 0; while ($count < 10) { $mw->update(); print $count; sleep 1; $count ++; } }