in reply to Re: WWW::Google::PageRank module
in thread WWW::Google::PageRank module

I work in Eclipse (with Perl plugin) and I just run it there. it says enter URl, I put www.net.hr or something and <enter>. result is always undef.
I also tried in cmd. I'm on WinXP, could that cause problems?

Replies are listed 'Best First'.
Re^3: WWW::Google::PageRank module
by Corion (Patriarch) on Jun 11, 2009 at 07:35 UTC

    The documentation even says:

    If query fails for some reason (google unreachable, url does not begin from 'http://', undefined url passed) it return undef.

    Read the documentation and follow the example in the documentation.

    use WWW::Google::PageRank; my $pr = WWW::Google::PageRank->new; print scalar($pr->get('http://www.yahoo.com/')), "\n";
      If you look at my code, you'll see that I add 'http://' to $url before passing the parameter. (my $url = "http://".$temp; )
      So I can enter URL without 'http://'.