in reply to LWP cookie mystery
Try using $ua->cookie_jar($cookie_jar) before the request, instead of the $cookie_jar->extract_cookies($resp); after the request. The latter wont pick up cookies recieved on redirects in the original request (I've hit plenty of sites with this problem).
T I M T O W T D I
T I M T O W T D I
In Section
Seekers of Perl Wisdom