in reply to Need help with WWW::Mechanize and Chrome cookies

I don't fully understand your problem and thus cannot tell if it is relevant, but the value of $cookie_dir differs in your examples.

Greetings,
-jo

$gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

Replies are listed 'Best First'.
Re^2: Need help with WWW::Mechanize and Chrome cookies
by bakiperl (Beadle) on Jul 08, 2021 at 13:54 UTC
    The first example uses the cookie file while in the second one uses the directory where the cookie resides.

    The code that uses WWW::Mechanize::Chrome loads the credentials from the cookie and allows the login but the code that uses the WWW::Mechanize does not. That's the problem.