Just be careful with automated queries, the Search Engines don't take too kindly to it. If you start hammering the serp's they will notice.
Basically, you use LWP to pull the SERP of your choice, then parse the returned content to pull out the info you need (usually done with regular expressions, but there are also several HTML parsing modules [search.cpan.org] that might fit the bill)