From: "Jesús Gabriel y Galán" Date: 2008-04-15T17:57:20+09:00 Subject: Re: noob 'why doesn't this work' question On Tue, Apr 15, 2008 at 2:14 AM, Vincent Angeloni wrote: > Basically, I'm trying to get a list of files/folders along with > a separate list of the sizes of said files. The array deletions > I asked about would be the deletion of files enclosed in folders > from the original file list and using the position of the items > in the file list to delete the corresponding array position in > the separate size list of those files. Another solution could be, instead of having 2 arrays, to have a single array where each position contains all the info for a file, maybe like an array or hash, and then delete based on the size info. Example: file_info = [["a.txt", 123], ["b.txt", 10000]] file_info.delete_if {|x| x[1] > 1000} will delete all entries whose size is bigger than 1000. As a hash: file_info = [{:name => "a.txt", :size => 123}, {:name => "b.txt", :size => 10000}] file_info.delete_if {|x| x[:size] > 1000} or you could have a custom object if you need more complex modelling of the file info. Hope this helps, Jesus.