my $NUM_DAYS = 7; my $time = time(); print scalar localtime ($time - (60*60*24*$NUM_DAYS));