# getting yesterday's date use Date::Calc qw(Today_and_Now Today Add_Delta_YMD Add_Delta_DHMS); # use Date::Calc to subtract one day from today's date my ($year, $month, $day, $hours, $minutes, $seconds) = Add_Delta_DHMS(Today_and_Now(),-1,0,0,0); # get date of last month by subtracting a month my ($year2, $month2, $day2) = Add_Delta_YMD(Today(),0,-1,0);