I compile the fellowing perl program and meet a problem:

use HTTP::Request;
use LWP::UserAgent;

$content=getContent('http://127.0.0.1/index.htm');
@html=split(/\n/,$content);
for(@html)
{
  do
  {
    $2 and push(@link,$2);
  }while m
    {
      <\s*A\s+HRE\s*=\s*(['''])(.*?)\l\s*>
    }gsix;
  print "All links in this page:\n";
  for(@link)
  {
    print $_,"\n";
  }
  print "Visit all links in this page: \n";
  for(@link)
  {
    if(!(m~^http://~))
    {
      $url=''.$_">http://127.0.0.1/'.$_ ;
      $content=getContent($url);
      print<<"EOF";
      content of this $url is:
      $content
      EOF
    }
    if((m~^http://127.0.0.1~)or(m~^http://localhost~))
    {
      $conten=getContent($_);
      print<<"EOF";
      content of this $url is:
      $content
      EOF
    }
  }
}

########################################
sub getContent
########################################
{
    my $url="">    my $ua=new LWP::UserAgent();
    my $request=new HTTP::Request('GET',"$url");
    my $response=$ua->request($request);
    my $content=$response->content;
    return $content;
}

When I compile it the compiler show me:

Can't find string terminator "EOF" anywhere before EOF at robot.pl line 84.##(red as I marked).##


Please tell how to......?
thanks a lot!
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to