I assume that you are using a perl script as this is PerlMonks and you mention using "one.cgi". I don't think that it is possible to get the cookie as a simple refresh but I'm sure that there is a way. Look at some shopping cart scripts.
Maybe someone here who is a expert will provide an example.