in reply to www::mechanize problem with url / redirect

Try using ->get("$1");

Turn on  ->show_progress(1); and  ->add_handler("request_send",  sub { shift->dump; return }); and  ->add_handler("response_done", sub { shift->dump; return }); and analyze the results

Replies are listed 'Best First'.
Re^2: www::mechanize problem with url / redirect
by McSvenster (Novice) on Dec 22, 2012 at 22:27 UTC

    wow, that was fast - thanks a lot! using ("$1") made no difference. The other hints will take time to analyse for me. Again Thank You!

      Just for the records: I added the code like this:

      $agent->show_progress(1); $agent->add_handler("request_send", sub { shift->dump; return }); $agent->add_handler("response_done", sub { shift->dump; return }); $agent->get("$1"); print $agent->content;

      It gave me a bunch of feedback like:

      (no content)
      HTTP/1.1 301 Moved Permanently
      Connection: close

      So I found the redirects and could break down the problem. Thanks a lot again! Mc