in reply to Cookie Problem

Ovid has given the best answer above. You may also want to take a look at our own davorg's NMS project here. Unfortunately, NMS doesn't have a replacement for Cookie stuff yet.

One thing to check: make sure your $uname variable doesn't have a trailing newline. That will appear to terminate the HTTP headers early -- I'm guessing that's what is happening because the first Set-Cookie isn't showing.

Again, even if this is a correct guess, and your code starts to work, listen to Ovid: use CGI!.

HTH