#!/usr/bin/perl -w use strict; use CGI; my $q = CGI->new(); open LOG,'>','logfile' or die "can't open logfile\n"; print LOG "Trying to set a cookie\n"; print header( -type => 'text/plain', -cookie => $q->cookie( -name=>'ident', -value=>'cookie#1') ); print "Cookie SET"; #### #!/usr/bin/perl -w use strict; use CGI; my $q = CGI->new(); my $bar = do_my_cookie_stuff( $q->param('foo') ); print header( -type => 'text/plain', -cookie => $q->cookie( -name=>'ident', -value=>$bar ) ); print "Cookie SET";