use Time::Local; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); # Yesterday is one second before the beginning of today: my $Yesterday = timelocal(0,0,0,$mday,$mon,$year) - 1; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime($Yesterday); ++$mon; $year += 1900; print "Yesterday: $mday.$mon.$year\n";