WWW::Mechanize single quotes around url

WWW::Mechanize single quotes around url

am 12.01.2007 06:54:29 von Randall

I used this code to post a form:

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

Here is the page that was returned:
Redirecting alink="#ff0000" text="#000000" vlink="#551a8b" link="#0000cc"
bgcolor="#ffffff">

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.

$agent->get($l);
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.