my $yesterday = time() - (24 * 60 * 60); my ($day, $month, $year) = localtime($yesterday)[3,4,5];