in reply to dump lwp::useragent to browser

Handing off a cookie is not easy. You can look at the various HTTP::Cookies modules for how to inject cookies into the browser's storage, but I've never tried injecting cookies into a live browser session.

If you're not bent on using WWW::Mechanize, there are alternatives for remote-controlling a web browser. For example, there is Win32::IE::Mechanize to automate Internet Explorer, and there is my module, WWW::Mechanize::Firefox. With these, you can automate the navigation, and you usually get Javascript support thrown in at no extra cost. With WWW::Mechanize::Firefox you can also inject cookies into the running Firefox session, if you want to keep the existing navigation code.