in reply to Re: URL Redirect
in thread URL Redirect

and "$res->redirects" returns what looks like an reference address pointer I am doing something wrong

You are trying to invoke a method call within a string. The method call will not execute and what you see displayed instead is the reference to the object ($res) on which the method would otherwise have been called. You could write it like this:

print STDERR "$Url redirects to " . $res->redirects . "\n";

which would be a general solution. However, we can see from the documentation that calling redirects on an HTTP::Response object returns a list, not a scalar. How you treat that will depend upon what you actually want this line of code to display. And what you want is not at all clear to me from the code you have provided.

Maybe take a step back and explain precisely what it is you are trying to achieve here?