Pratheepan Raveendranathan


        Search - Examples of GoogleHack search function.


        #include GoogleHack, so that it can be used

        use WebService::GoogleHack;

        #Change this variable if you are running this program from a directory
        #Other than WebService/GoogleHack/Example/


        #Create an Object of type WebService::GoogleHack

        $google = new WebService::GoogleHack;

        #initialize the object to required parameters by giving path to config


        #Now call search function like this

        #Here I am searching for duluth.


        #The results variable will now contain the results of your query.

        #Printing the searchtime

        print "\n Search Time".$google->{'searchTime'};

        #Printing the snippet element 0

        print "\n\nSnippet".$google->{'snippet'}->[0];


The examples in this module are meant to serve as a means of introducing to the user how to use GoogleHack to use the search method, and retrieve the results.


Pratheepan Raveendranathan, <>

Ted Pedersen, <>



WebService::GoogleHack home page -

Pratheepan Raveendranathan -

Ted Pedersen -

Google-Hack Maling List <>


Copyright (c) 2005 by Pratheepan Raveendranathan, Ted Pedersen

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to

The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.