sub foo { print "bar\n"; } while(1) { foo(); sleep(30); }