blob: b409448110d478f73c8cf67d8425eed7a15626dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#!perl -wT
use strict;
use CGI;
use CGI::Cookie;
my %cookies = CGI::Cookie->fetch;
my $name = 'ApacheTest';
my $c = ! exists $cookies{$name}
? CGI::Cookie->new(-name=>$name, -value=>time)
: '';
print "Set-Cookie: $c\n" if $c;
print "Content-Type: text/plain\n\n";
print ($c ? 'new' : 'exists'), "\n";
|