From: daz Date: 2003-07-05T17:23:35+09:00 Subject: Re: exerb - how does it work? "Kingsley Hendrickse" wrote: > ________________ > class Test > def ipfind > a = `ipconfig` > a =~ /\d\d\d\.\d\d\.\d\d\d\.\d\d/ > ip = $~ > return ip > end > end > i = Test.new.ipfind > puts i > _______________ > Not directly related, but you can find your IP address with ... require 'socket' i = IPSocket.getaddress(Socket.gethostname) puts i ... although I just tried that in a win98 DOS box as ruby -rsocket -e'puts IPSocket.getaddress(Socket.gethostname)' and got no reply (& no error). Should work ? (Probably my set-up; never use cmd line.) daz