title: Download an HTML page and check content
body: <p>This is my perl script:</p>
  
  <pre><code>#!/usr/local/perl
  
  use strict;
  use warnings;
  use LWP 5.64;
  use HTTP::Cookies;
  
  my $browser=LWP::UserAgent-&gt;new;
  
  $browser-&gt;agent('Mozilla/5.0'); #etc
  
  my $cookie_jar=HTTP::Cookies-&gt;new(
          file =&gt; '/home/andrew/Documents/Perl/CheckResultsURL/cookies.txt',
              autosave =&gt; 1,
  );
  
  $browser-&gt;$cookie_jar($cookie_jar);
  
  my $url="http://scholar.google.com/scholar?hl=en&amp;q=john";
  
  #send request
  my $response=$browser-&gt;get($url);
  
  if($response-&gt;content=~/about(\s)((\d)+)/){
          print "yes";
  }
  
  print $response-&gt;content;
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>Can't locate object method "Cookies=HASH(0x22bf388)" via package "HTTP" at lwp.pl line 17.
  </code></pre>
  
  <p>And sadly I don't know  what to do. Probably it has to do with a cookie control I don't pass. Any help?</p>