in reply to Reloading

well, something like this could help:
sub foo { print "bar\n"; } while(1) { foo(); sleep(30); }
This will execute function foo every 30 seconds. I am aware that you might be looking for something else, but hope this helps too.