in reply to Problem calling WWW::Mechanize redirect_ok

seems  $agent is not return anything from the get method which cause to the error  Can't call method . Can you Dumper the  $agent before calling '$agent->redirect_ok()' method.
-kulls

Replies are listed 'Best First'.
Re^2: Problem calling WWW::Mechanize redirect_ok
by js1 (Monk) on Jan 06, 2006 at 14:16 UTC

    I found the fix. The problem was in the headers. Here's my code:

    $results=$agent->get('http://lhrbod-apdhz001.ad.com/ess/'); print $results->{_headers}->as_string(); print "\n\n"; print $agent->content();