One would sign up for an API Key (after reading and agreeing to the Ts & Cs):
"To access the Google Web APIs service, you must create a Google Account and obtain a license key. Your Google Account and license key entitle you to 1,000 automated queries per day."
Then take a look at Cpan results for Google , such as WWW::Search::Google and start from there perhaps.