> =begin Here is my solution. It accepts input like this: 2500_5000 #lower_upper 2500_ #lower only _5000 #upper only =end min,max = ARGV[0].split(/_/) a,b,c = (1000..3000).to_a,(6000..10000).to_a,(500..2500).to_a l,u = min.to_i,max.to_i u = [a,b,c].flatten.max if max == nil l = 0 if min == "" cust = (l..u).to_a p "a" unless (cust & a).empty? p "b" unless (cust & b).empty? p "c" unless (cust & c).empty? Harry -- A Look into Japanese Ruby List in English http://www.kakueki.com/ruby/list.html