if $cookie = $cgi->cookie("Whatever") check to see if it meets our standards do business #elsif $cgi->cookie("CookieTest") ## Oops! mistyped... elsif $cgi->param("CookieTest") ## Corrected #we tried to set a cookie and failed bailout else set the cookie set a http location: header line that includes: the url by which we arrived here + CookieTest=1 in the query string clean up and exit end