sub non_event_driven { if (fork()) { # i'm the parent! return 1; } else { # i'm the child! for (;;) if (time() == $waiting_epoch) { # ta-da! play an mp3 and wake up our user # or whatever exit 0; # safe for shell, and we're done anyways } } } return 0; }