I am having a problem using WWW::Mechanize. It seems no matter what website I try accessing, my script just sits there in the command prompt until it times out. The only things that come to mind that might be relevant are the following:
- I have IE7, chrome, and FF installed. FF was my default browser but I recently switched that to chrome.
- I seem to be able to access websites with port 8080 just fine.
- I recently experimented with the cookie jar but stopped using it because, honestly, I’m not sure how it works. This may have instantiated a change.
Here is an example:
#!/usr/bin/perl -w
use strict;
use WWW::Mechanize;
my $url = 'http://docstore.mik.ua/orelly/perl/learn/';
my $mech = WWW::Mechanize->new();
$mech->get( $url );
print $mech->content;
The code seems to work, so it must be a firewall/proxy issue. You can try setting a proxy: