in reply to Cookie Problem

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