#!/usr/bin/perl
use HTMLObject::Normal;
my $doc = HTMLObject::Normal->new(displayOnExit => 1);
$doc->setCookie(name => 'cookie name', value => 'This rocks!', expires => "2 days 30 min");
$doc->setLocation("http://www.pcxperience.org");
# Actually generate the entire document, cookie and all!
# Which since we have displayOnExit => 1 set, is done automatically for us. :)
$doc->doNotDisplay(0);