in reply to Re: Different answers for script and browser (LWP)
in thread Different answers for script and browser (LWP)

Alternatively, there is $ua->simple_request() which does not redirect.