in reply to [untitled node, ID 159619]

An easy way to determine what is happening behind the scenes with HTML is to look at it without any HTTP interpretation. For example, running your example on the command line give me:
Set-Cookie: USER_ID=1; domain=.robotskull.com; path=/; expires=Thu, 16 +-May-2002 20:48:56 GMT Date: Tue, 16 Apr 2002 20:48:56 GMT Content-Type: text/html; charset=ISO-8859-1
(If you're on Windows or some other non *nix system and the command line is a new concept for you, I suggest you get used to using it on occasion. For some tasks it simply can't be beat.)

Update: It's a subtle bug that often catches new cookie programmers (I know it caught me) -- Don't forget that the page that SETS the cookie can't SEE the cookie. (as in, the same section of code that calls cookie() to set a cookie can't then retreive the value by another cookie call, because the values you're retrieving are the cookies that were previously set. Any new cookies can be read on subsequent pages.)

Replies are listed 'Best First'.
Re: Re: General cookie information
by Kanji (Parson) on Apr 16, 2002 at 22:57 UTC

    ... and if you can't find your way to the command-line, you can always double print the header.

    # I use text/plain because it makes # content look like 'view source', but # it isn't necessary. print header( 'text/plain' ); # Since we've already printed a header, # this one gets printed to the browser # screen instead. print header( -cookie => $cookie );

        --k.