From: "semmons99@..." Date: 2006-02-26T22:53:34+09:00 Subject: [SOLUTION] Current Temperature (#68) # Author: Shane Emmons # # Allows retrieval of current temperature information. Pretty simple # and straight forward. Uses match to extract data from the xml document # that is returned. Sorry about the long lines, but I like putting as # much code in one line as possible. # # usage: ruby current_temp.rb [zipcode|other] # # zipcode: US zipcode # other: country code information. example: SPXX0050 for Madrid, Spain require 'net/http' begin weather_info = Net::HTTP.get( "xml.weather.yahoo.com", "/forecastrss?p=".concat( ARGV[ 0 ] ) ) print "The temperature in ", weather_info.match( /Yahoo! Weather for (.*)