sub start_process{ my $count = 0; while ($count < 10) { $mw->update(); print $count; sleep 1; $count ++; } } #### sub start_process{ my $count = 0; while ($count < 10) { print $count; # sleep 1; for (my $i = 0; $i < 10; $i++) { select(undef, undef, undef, 0.1); $mw->update; } $count ++; } } #### my $b_started = 0; #### sub start_process{ $b_started++ and return; my $count = 0; while ($count < 10) { print $count; # sleep 1; for (my $i = 0; $i < 10; $i++) { select(undef, undef, undef, 0.1); $mw->update; } $count ++; } $b_started = 0; }