sub check { print "Check\n"; $_[KERNEL]->delay(move_pic => 3); $_[KERNEL]->delay(get_pic => 1); } sub get_pic { print "get_pic\n"; $_[KERNEL]->yield('check'); } sub move_pic { print "move_pic\n"; $_[KERNEL]->yield('check'); } #### sub start { $_[KERNEL]->delay(get_pic => 10); $_[KERNEL]->delay(move_pic => 30); } sub get_pic { print "get_pic\n"; $_[KERNEL]->delay(get_pic => 10); } sub move_pic { print "move_pic\n"; $_[KERNEL]->delay(move_pic => 30); }