in reply to Running subroutines at specific times

POE provides a framework for this kind of thing and much much more:
  2006/04/20 10:57:59 sub10
  2006/04/20 10:57:59 sub15
  2006/04/20 10:58:09 sub10
  2006/04/20 10:58:14 sub15
  2006/04/20 10:58:19 sub10
  2006/04/20 10:58:29 sub10
  2006/04/20 10:58:29 sub15
use POE; use Log::Log4perl qw(:easy); Log::Log4perl->easy_init($DEBUG); POE::Session->create( inline_states => { _start => sub { $poe_kernel->yield("sub10"); $poe_kernel->yield("sub15"); }, sub10 => \&sub10, sub15 => \&sub15, }); $poe_kernel->run(); sub sub10 { DEBUG "sub10"; $poe_kernel->delay("sub10", 10); } sub sub15 { DEBUG "sub15"; $poe_kernel->delay("sub15", 15); }