Do a google search and parse the result html

#!/usr/bin/env ruby

require 'open-uri'

url = 'http://www.google.com/search?q=ruby'

open(url) { |page| page_content = page.read()

  links = page_content.scan(/<a class=l.*?href=\'(.*?)\'/).flatten

  links.each {|link| puts link}

}