in reply to Re^2: LWP::UserAgent does not send Cookies
in thread LWP::UserAgent does not send Cookies

I think you will actually need to supply the proper hostname when you call ->add_cookie in your code. See HTTP::Cookies on the parameter order.

Personally, I would first set up an empty cookie jar, visit the site with (say) WWW::Mechanize, save the cookie jar to a file, and then reuse that file. This removes all the hassle of writing and debugging code just to get the correct cookies in place.

Replies are listed 'Best First'.
Re^4: LWP::UserAgent does not send Cookies
by CodeVixen (Initiate) on Sep 26, 2014 at 19:53 UTC
    I'll give that a try!