in reply to Cookie Problem

Hmmm while all the above posters are correct in their comments. The actual problem is that you printed the header before setting the cookie. You need to set the cookie first and then print the header like this:
&SetCookies('name',$uname); &SetCookies('pass',"$enc_cert"); print "\n"; print "Content-type: text/html\n\n";

Because everything that comes after the content-type is considered by the browser to be part of the page