From: Brian Candler Date: 2008-10-13T04:29:31+09:00 Subject: Re: Help with some codes Ingrid paris wrote: > heya all! > > well, am such a newbies in this world of ruby language, though! i found > it very interesting language and i am pretty much can catch up myself > but not as fast as i've thought. anyway, below are some source code > which i need some alternation to make it loop and adding 'while' > statement...anybody could have something to say?? > > regards I think your problem line should be changed to macaddr.each { |mac, aplist| puts "\n ALERT!\t\n An Imitation of MAC address #{mac} were found >> #{aplist.inspect}" if aplist.size > 1} (Note in particular that you iterate over the hash 'macaddr', not the closed IO object mac_conf, and since aplist is an array you need to check aplist.size) -- Posted via http://www.ruby-forum.com/.