zli034 has asked for the wisdom of the Perl Monks concerning the following question:

I want to get the addresses from a yellow page like data base. What I can see are all the web pages from my web browser. Is there any existed similar codes can help me connect to the yellow page database and read the pages and extract the address automatically? Thank you guys. zli034

Replies are listed 'Best First'.
Re: Get the address from a page
by Joost (Canon) on Sep 01, 2007 at 00:05 UTC
    OK, take a step back and simplify.

    I'm going to assume a lot of stuff here and hopefully give you a useful pointer.

    Assumption 1: you want to store some information that you, as a user, and can read from a website.

    Assumption 2: the information you can read is reachable on a single page, or URL, or is reachable from that URL by following ordinary links (i.e. <a> tags with a href property) and/or HTML forms.

    In other words, you want to "click" and traverse a website, download pages and extract certain snippets of information from that site.

    You want the WWW::Mechanize module.

    Take a look at that module, and if it isn't what you need, please don't hesitate to clarify your specifications.

      Cool tool. Joost you are completely right. Let me have a read. You have a good day.
      Is there any module other than www::mechanize to do this? The HTML::Parser, which needed, doesn't work on my PC. It just doesn't work. Please see my another node about the Html::parser.