Hi, i am trying to write a program for a web crawler and i could do with some help. The start of my code is written below:
***************************************** use WWW::Robot; #Module used to strip the contents from the HTML(leave only the text) print "Please input the URL of the site to be searched \n"; $url_name = <STDIN>; # The user inputs the URL to be searched #Create an instance of the webcrawler $web_crawler = new WWW::Robot('NAME' => 'My WebCrawler', 'VERSION' => '1.000', 'EMAIL' => 'email@email'); #Below the attributes of the web crawler are set $web_crawler->addHook('invoke-on-all-url', \&invoke_test); ************************************
My problem is that the compiler gives me error messages i can't get the hang of. It says:

WWW::Robot: failed to create User Agent object: LWP::RobotUA from address required at C:/Perl/site/lib/WWW/Robot.pm line 1160.

I have tried various things to get round this but can't seem to find the problem. I suspect its something simplebut havent got the knowledge to find what. The WWW::Robot and LWP::RobotUA are installed with my version of Perl. Thanks for viewing

20050719 Edit by ysth: p, code tags


In reply to Failure to create user agent object by lampros21_7

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.