my $week_of_seconds = 60 * 60 * 24 * 7; my $current_time = time(); my $week_ago = $current_time - $week_of_seconds; my ($sec,$min,$hour,$mday,$mon,$year, $wday,$yday,$isdst)=localtime($week_ago);