in reply to Re^2: LWP::UserAgent error Unexpected keys - LocalHost
in thread LWP::UserAgent error Unexpected keys - LocalHost

Hmm... that's not actually LWP's response (despite that 'internal' stuff). Do you use a proxy by any chance? It seems Python's urllib can automatically detect it. Try
my $ua = ... # as before $ua->env_proxy; ...

Replies are listed 'Best First'.
Re^4: LWP::UserAgent error Unexpected keys - LocalHost
by Anonymous Monk on Jul 30, 2014 at 00:08 UTC
    Oh wait, I forgot - it's actually LWP's response.