From: Michael Schmarck Date: 2008-01-25T00:09:57+09:00 Subject: Re: Change a data structure yermej wrote: > I'll offer up an inject version (mostly for novelty's sake): > timing_given.each {|k, v| timing_given[k] = v.inject(Hash.new {|h, k| > h[k] = []}) {|acc, h| h.each {|k, v| acc[k] << v}; acc}} Geez - did you use to code perl code? Because Perl code tends to be as unreadable and compact as yours :) It works good, but I guess I've got some reading to do, to actually understand why it's working ;-> Cheers, Michael