google search in multiple sites

Discussion in 'Perl Misc' started by kans, May 12, 2005.

  1. kans

    kans Guest

    kans, May 12, 2005
    #1
    1. Advertising

  2. kans

    Guest

    here's something that will do a part of what you want to do.

    #!usr/local/bin/perl -w

    # change the code below to loop through different files

    $filename = "placeyourinputfilenamehere.ext";

    open (INFILE, $filename);

    @array = <INFILE>;

    foreach $line (@array) {
    if ($line =~ /slide show/) {
    print "Found in file $filename\n";
    }
    }
    , May 12, 2005
    #2
    1. Advertising

  3. kans

    J. Gleixner Guest

    wrote:
    > here's something that will do a part of what you want to do.
    >
    > #!usr/local/bin/perl -w
    >
    > # change the code below to loop through different files
    >
    > $filename = "placeyourinputfilenamehere.ext";
    >
    > open (INFILE, $filename);
    >
    > @array = <INFILE>;
    >
    > foreach $line (@array) {
    > if ($line =~ /slide show/) {
    > print "Found in file $filename\n";
    > }
    > }
    >


    What does looking for 'slide show' in a local file have to do with the
    subject of "google search in multiple sites"?
    J. Gleixner, May 12, 2005
    #3
  4. kans

    J. Gleixner Guest

    kans wrote:
    > Hi,
    >
    > I would like to search for a particular key word in multiple sites
    > frequently. For example, if I want to search for "slide show" in the
    > following sites, how do I do that? Is there some script I can use?
    >
    > www.nytimes.com
    > www.cnn.com
    > news.bbc.co.uk
    > www.washingtonpost.com
    > www.latimes.com
    > www.boston.com/news/globe/
    > www.sfgate.com


    What have you tried?

    There are quite a few Google related modules on CPAN that will help you
    use Google's results without having to do any page scraping.

    http://search.cpan.org/search?query=google&mode=all
    J. Gleixner, May 12, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Buchan
    Replies:
    1
    Views:
    466
    Eric Lawrence [MSFT]
    Feb 20, 2004
  2. Paul Briggs
    Replies:
    1
    Views:
    333
    Joshua Gosse
    Feb 21, 2004
  3. Stefan Caliandro
    Replies:
    2
    Views:
    617
    Beauregard T. Shagnasty
    Feb 14, 2005
  4. Jasbird

    Sites about web-sites ?

    Jasbird, Sep 12, 2006, in forum: HTML
    Replies:
    1
    Views:
    393
  5. imx
    Replies:
    10
    Views:
    794
Loading...

Share This Page