Dave,
require 'net/http'
h = Net::HTTP.new('www.pragmaticprogrammer.com', 80)
resp, data = h.get('/index.html', nil)
if resp.message == "OK"
data.scan(/<img src="(.*?)"/) { |x| puts x }
end
> I just ran this on my NT box (with 1.6.2 -- I've overwritten my
> 1.6.3, sorry) and it works OK. What problems do you see?
Found the problem:
I named a file "socket.rb" in the same directory.
As soon as I renamed it, everything worked :)
Tobi
--
Tobias Reif
http://www.pinkjuice.com/myDigitalProfile.htm