#!/usr/bin/perl use CGI qw(:standard); #The line above says what app to use to run #This script print "Content-type: text/html\n"; print "Set-Cookie: bob=hello\n\n"; # although we don't send the status line, # general and response headers, it does need # to give the entity headers print <First CGI

My first CGI program!

The query string was $ENV{'QUERY_STRING'}
The cookie string sent from the browser was: $ENV{HTTP_COOKIE}

HTML $bob =cookie("bob"); print p("bob's value was: $bob"); print end_html;