my ($day, $month, $year) = (localtime(time() - 86400))[3, 4, 5]; $month += 1; $year += 1900;