in reply to Re^2: Cant get Mechanize to work.
in thread Cant get Mechanize to work.

That happens because you are using the object in ways not documented by the WWW::Mechanize documentation. Please re-read the documentation on ->get and what the method returns. You have the following code:

$page = $mech->get("http://www.google.com");

This usage is nowhere documented.

Also see the documentation on ->find_link. It shows the following example:

$mech->find_link( n => $number );

Note how the method is called on a variable named $mech.

Replies are listed 'Best First'.
Re^4: Cant get Mechanize to work.
by ufizo (Initiate) on Jul 10, 2011 at 12:18 UTC
    Thank you for pointing that out. I understand my mistake. Thank you.