# define the seconds in a week use constant WEEK => 60 * 60 * 24 * 7; my $now = time(); my $then = $now + WEEK * 2;