# get the epoch seconds for 8:00am the following day # NOTE if it's after midnight this doesn't work but # should be trivial to fix my $now = time(); my ($mday, $mon, $year) = (localtime($now))[3,4,5]; my $then = timelocal(0, 0, 8, $mday + 1, $mon, $year); my $difference = $then - $now; sleep($difference);