From: Robert Klemme [mailto:shortcutter / googlemail.com] # Here's a variant: <snip> i was not going to send my soln since many had already sent theirs (and i was busy playing :)), yet i was surprise how similar was mine to robertk's, so... (just happy that i can be as good as robertk ..sometimes ;) C:\family\ruby>cat test.rb # a = age # n = name hist = Hash.new { |h,a| h[a] = [] } DATA.each do |entry| n, a = entry.split /\s*?,\s*/ break if a.nil? hist[a.to_i] << n.strip.capitalize end hist.sort_by{|a| a}.each do |a,n| s = n.size puts "#{a} -> #{s} #{"x"*s} (#{n.sort.join(', ')})" end __END__ Bob, 2 Jim ,2 eric, 4 # note: RoB, 5 # i can put comments bot, 4 #this is me :) justin, 4, unneeded extras joe,zero --- no more here ---- C:\family\ruby>ruby test.rb 0 -> 1 x (Joe) 2 -> 2 xx (Bob, Jim) 4 -> 3 xxx (Bot, Eric, Justin) 5 -> 1 x (Rob) C:\family\ruby> i could have used ruport, but that would be overkill :) kind regards -botp