From: Siep Korteling Date: 2008-02-07T08:36:46+09:00 Subject: Re: Array Practice Adam Akhtar wrote: (...) > rangeleft = list.index(uniqlist[i]) > rangeright = list.rindex(uniqlist[i]) > subpacklist << list.slice(rangeleft..rangeright) I like the index/rindex trick. I have actualy done a similar job, going through a big logfile to see which users were most active. I opted for an array of hashes, with the frequency as value. My result would have been: [{1=>3},{2=>4},{3=>2},{4=>1}] Can adapt your code to do the same? -- Posted via http://www.ruby-forum.com/.