From: "Peña, Botp" Date: 2008-04-15T11:08:29+09:00 Subject: Re: noob 'why doesn't this work' question From: list-bounce@example.com # And thanks to everyone who responded. 101 ways to do this would # be great, but I'll settle for 4 or 5. ;-) i hope this catches up the 5th way :) ruby1.9 though, irb(main):004:0> sizeList.group_by.with_index{|e,i| countarray.include? i} => {false=>[0, 1, 2, 5], true=>[3, 4, 6]} fr here you can get what gets deleted, irb(main):016:0> sizeList.group_by.with_index{|e,i| countarray.include? i}[true] => [3, 4, 6] and what remains, irb(main):017:0> sizeList.group_by.with_index{|e,i| countarray.include? i}[false] => [0, 1, 2, 5] the beauty here is you can go slowly, and picture out and compare in advance what will be deleted and what will remain... kind regards -botp