Marston A. wrote: > I'm trying to do something regarding looping through an array, but only > with elements I need. I'm not sure exactly how to go about it to make it > the most efficient. Is there basically a way to do something like: > > for row in @large_row_array WHERE row.element == "something" > ... some some stuff > end You can use array.select as the others have mentioned, or you can use next like this: for row in @large_row_array next unless row.element == "something" ... some some stuff end That might be a bit quicker over large data sets, too -- select will loop through your data before the for loop. Cheers, Dave