WWW::Mechanize single quotes around url

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I used this code to post a form:

$agent->field("Email", xxxxxxxxxxxt');
$agent->field("Passwd", 'xxxxxxxx');
$agent->untick("PersistentCookie", "yes");

Here is the page that was returned:
<html> <head> <title>  Redirecting  </title> <meta content="0;
url='http://video.google.com /'" http-equiv="refresh">   </head> <body
alink="#ff0000" text="#000000" vlink="#551a8b" link="#0000cc"
bgcolor="#ffffff"> <script type="text/javascript"

    location.replace("http://video.google.com /")
  //--> </script> </body> </html>

I processed the page like this:

my $link = $agent->find_link();
my $l = $link->url();
print $l;

Output: 'http://video.google.com /'

I then take $l and do a get.

print $agent->uri() . "\n";

Output: http://www.google.com

For some reason when find_link() grabs the link it also grabs the
single quotes around the link.  This apparently causes get() to drop
the subdomain??
If I redefine $l without the single quotes like this:
$l="http://video.google.com ";

Then the correct page is retrieved.

Has anyone seen this before?

This is my first experience with Mechanize so maybe (probably)  I'm
just missing something.

Site Timeline