#! /perl/bin/perl use CGI; $query = new CGI; #print $query->header; #print $query->header(-cookie=>$cookie); #print $query->start_html('My cookie-get.cgi program'); #print $query->h3('The cookie is ...'); #Check if cookie is true else, creating a cookie... $theCookie = $query->cookie('aa_exit'); if(!$theCookie){ $exit_link = "$ENV{'QUERY_STRING'}"; $cookie = $query->cookie(-name=>'aa_exit', -value=>$exit_link, -expires=>'+4h', -path=>'/'); print $query->header(-cookie=>$cookie); print $query->h3('The cookie NOW is ...'); $theCookie = $query->cookie('aa_exit'); print "
^^^^^\n"; print $theCookie; print "^^^^^
*****\n"; print $theCookie; print "*****\n"; } print $query->end_html;