in reply to Re: LWP get Cookies for API
in thread LWP get Cookies for API

my $cookies = HTTP::Cookies->new(); my $ua = LWP::UserAgent->new( cookie_jar => {} );

ICBW but it looks to me like you are setting up a new cookie jar in $cookies but then failing to associate that with your user agent. The docs for LWP::UserAgent also suggest using a HTTP::CookieJar::LWP instead. Try replacing these lines with

my $cookies = HTTP::CookieJar::LWP->new; my $ua = LWP::UserAgent->new( cookie_jar => $cookies );

and see if that gets you any further.