until ($date eq $today) { $dbh->do("update table set date=20070101 where date='01:01:2007'"); $date = nextdate($date); }