in reply to Can't call method "extract_cookies" on an undefined value

You should use the WWW::Mechanize subclass of LWP::UserAgent, its most convenient, you don't have to write 80% of what you wrote

See also Re^2: Cannot create a cookie using HTTP::Cookies for *secrets*

  • Comment on Re: Can't call method "extract_cookies" on an undefined value