my $refresh_world = sub { glutMainLoopEvent; glutPostRedisplay; }; my $t; $t = AE::timer 0, 0.01, sub { $refresh_world->(); }; $refresh_world->(); AE::cv->recv;