my $six_days_from_now = (localtime(time + 6*24*60*60))[3]; if ($six_days_from_now == 1) { Do_Action(); }