#!/usr/bin/perl use strict; use CGI; my $cgi = new CGI; print $cgi->header( -cookie => new CGI::Cookie( -name => 'ChocolateChip', -value=> $cgi->param('name'), -expires => 'Thu, 26-Sep-2002 00:00:00 GMT', -domain => 'students.cs.byu.edu', -path => '/' ) ) #### #!/usr/bin/perl use strict; use CGI; my $cgi = new CGI; my %cookie = $cgi->cookie(-name => "ChocolateChip"); if(defined %cookie) { # read from the cookie ChocolateChip to have my document display user # preferences that were saved int the -value=> part of the cookie }