#! /usr/bin/perl # httphead - Print the http headers require ("cgi-lib.pl"); &ReadParse(); print "Refresh: 5\n"; $cook = $ENV{'HTTP_COOKIE'}; @breakout = split (/;/,$cook); foreach $variable ( sort @breakout ) { @cvals = split (/=/, $variable); if ($cvals[0] eq "curcount") { $curc = $cvals[1]; } } if ($curc eq '') { $curc = 0; } $newc= $curc + 5; print "Set-Cookie: curcount= $newc\n"; print "Content-type: text/html \n"; print "\n"; print <Count Demo

Count and Refresh Demo

END print "

The Count is $curc

\n"; print "\n"