What you are showing is not a server cookie. It is the client side request to the server which sends cookie data back to the server in the form:

Cookie: NAME1=OPAQUE_STRING1; NAME2=OPAQUE_STRING2 ...

The server sends multiple cookies in the form:

Set-Cookie: CUSTOMER=WILE_E_COYOTE; path=/; expires=Wednesday, 09-Nov- +99 23:12:40 GMT Set-Cookie: PART_NUMBER=ROCKET_LAUNCHER_0001; path=/

When client requests a URL in path "/" on this server, it sends:

Cookie: CUSTOMER=WILE_E_COYOTE; PART_NUMBER=ROCKET_LAUNCHER_0001

If I have a script that sends two Set-Cookie headers I have no problem retreiving them. Perhaps this will work for you. See HTTP::Cookies

use LWP::UserAgent; use HTTP::Cookies; my $url = "http://localhost/cgi-bin/test.pl"; my $lwp = LWP::UserAgent->new( ); my $cookie_jar = HTTP::Cookies->new; $lwp->cookie_jar( $cookie_jar ); my $response = $lwp->get($url); print $response->as_string; my %hash; $cookie_jar->scan( sub { $hash{$_[1]} = $_[2] } ); print "\n\nCookies baked:\n"; print "$_:$hash{$_}\n" for keys %hash; __DATA__ HTTP/1.1 200 OK Connection: close Date: Thu, 24 Apr 2008 12:59:39 GMT Server: Apache/2.2.8 (Win32) Content-Type: text/html Client-Date: Thu, 24 Apr 2008 12:59:39 GMT Client-Peer: 127.0.0.1:80 Client-Response-Num: 1 Client-Transfer-Encoding: chunked Set-Cookie: JSESSID=1234 Set-Cookie: PCLT=5678 Hello! Cookies baked: PCLT:5678 JSESSID:1234

In reply to Re: Cookie Problem by tachyon-II
in thread Cookie Problem by chuck_norris

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.