in reply to Send cookie to CGI script

Examine your cookie jar with
  print $jar->as_string;
Supplying more arguments to set_cookie does help, i.e.:

  $jar->set_cookie(undef, 'message', 2, '/', '.somedomain.com', 80, 0, 0, 100, 0, {});
  print $jar->as_string;

Which results in:

Set-Cookie3: message=2; path="/"; domain=".somedomain.com"; port=80; expires="2000-12-15 21:59:27Z"; version=0

I have noticed that set_cookie's $domain parameter requires two periods or it will not accept the cookie.