http://www.perlmonks.org?node_id=506957


in reply to LWP::UserAgent with HTTP::Cookies problems

Cookies are a pain to debug. It's helpful to see exactly what headers are being passed back and forth. There's a very cool tool called Charles that can help. It's a personal proxy server made for debugging things like this.

Tell your perl script to use it and record that request/response. Then tell your browser to use it and record that. Then compare the two. Chances are some difference between the headers or the request content will jump out at you.

As a separate note, are you sure the domain in your cookies is valid? I think cookie domains are supposed to start with a ".", like ".here.com". I'm not sure though. (That's something you could find out by proxying your browser.)

-Joe