From: bobh@... (Robert) Date: 2001-09-20T00:04:21+09:00 Subject: [ruby-talk:21394] Socket Scan against network computer require 'socket' (0..100).each { |port| begin puts "trying: #{port}" server = TCPSocket.open("000.00.0.0", port) puts "***SUCCESS: port #{port}" rescue puts "couldn't open port: #{port}" ensure server.close end } GIVES ME: ../socket.rb:10: undefined method 'close' for nil (NameError) from ./socket.rb:2:in 'each' from ./socket.rb:2 from socket.rb:1:in 'require' from socket.rb:1 The IP, is of course, an actual IP. Any ideas? Yes I am a newbie. Looking at moving from Python. Bob