From: Ludwigi Beethoven Date: 2003-06-21T05:25:30+09:00 Subject: Trying to use Net::HTTP sample program from "The Ruby Way" I am trying to learn some of the functions within Net::HTTP. My goal is to be able to access a web page and extract the information I need from it. For example, a search on www.amazon. com where I pass an author name should return a list of all books written by the author. To learn about Net::HTTP I am trying to use the sample program p441a.rb but it is failing and I don't understand the nature of the problem. When I invoke that program, I get the following message: p441a.rb:11: private method 'split' called for nil (NoMethodError). If I try www.amazon.com I get the same result. Am I missing something? PS: Here is pgm p441a.rb: require "net/http" begin h = Net::HTTP.new("www.ruby-lang.org", 80) resp, data = h.get("/en/index.html", nil) rescue => err puts "Error: #{err}" exit end puts "Retrieved #{data.split.size} lines, #{data.size} bytes" # Process as desired... __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com