in reply to how do I set a cookie and redirect

After you set your cookie, print out the following meta tag in the header of the file. It'll use the browser's refresh to direct you to a new page.
print qq~<meta http-equiv="refresh" content="0;URL=url.html">\n~;