in reply to How can my script accept cookies?

Admittedly, I don't have a whole lot of experience with cookies, especially in the manner you are working here. But, to summarize, here is what the LWP::UserAgent has to say about cookies:

$ua->cookie_jar([$cookies]) # Get/set the HTTP::Cookies object to use. The default # is to have no cookie_jar, i.e. never automatically add # "Cookie" headers to the requests.

In the LWP CookBook (man lwpcook), I found this (and it has some examples):

COOKIES Some sites like to play games with cookies. By default LWP ignores cookies provided by the servers it visits. LWP will collect cookies and respond to cookie requests if you set up a cookie jar. use LWP::UserAgent; use HTTP::Cookies; $ua = LWP::UserAgent->new; $ua->cookie_jar(HTTP::Cookies->new(file => "lwpcookies.txt", autosave => 1)); # and then send requests just as you used to do $res = $ua->request(HTTP::Request->new(GET => "http://www.yahoo.no") +); print $res->status_line, "\n"; As you visit sites that send you cookies to keep, then the file lwpcookies.txt" will grow.

I don't know how much that will help since I can't give you any examples of my own, but I thought I would post it anyway. I have found reading the lwpcook and LWP::UserAgent documentation helpful in what I have done with LWP, so I recommend reading it if you haven't already.

D a d d i o