From: Ben Aroia Date: 2008-03-31T03:06:13+09:00 Subject: Re: HTTP GET requests in a Ruby CGI Script mdiam wrote: > On Mar 29, 9:39�pm, Ben Aroia wrote: >> I think I've got it. I *think* it was a problem with calling a function >> before sending the content-type bit. Darn. > > Not sure about that, there were at least two errors in your script: > 0.upto(results-1) { |i| > => 0.upto(results.to_i-1) { |i| > and: > print tempbod.split(//).length-1 > => print body.split(//).length-1 > > Any error stop the script! > > -- Maurice The results is not a string, it's an int. So thats not an error. The second print statement has been removed so it's not an issue. Actually, when I look at the code again, I had changed the call to that function from body = google(search, num) to body = google(search, num.to_i) Everything works, more or less. And you can find the current page at http://www.googleplainly.com if you're interested. -- Posted via http://www.ruby-forum.com/.