#!/usr/bin/perl -w

use strict;
use diagnostics;
use CGI;

# Create an instance of CGI
my $query = new CGI;

# Create a new cookie with a name "counter" and
# the value "1".
my $cookie = $query->cookie(-name => "counter", -value => 1);

# Send a header to the user, including a cookie
print $query->header(-type => "text/html",
	-cookie => $cookie);

# Send some HTML as a placeholder
print $query->start_html(-title => "Cookie set");
print "<P>The cookie named "counter\" <\\>
has been set to 1.</P>\n";
print $query->end_html;
