From: Dark Ambient Date: 2006-07-04T03:27:07+09:00 Subject: Array loops: new thread I thought it would be better to start a new thread for my current issue, since the old one is filled with code in various stages. Apologies. Gives me a chance to ask more succinctly regarding the core issue. This is just an example. I have 2 arrays firstarray = ['1','2,'3','4','5'] secondarray = ['1','2','3','4','5','6','7'] I'm looping through firstarray.each do |x| go through some blocks. At some point, either the start of the outter array or somewhere down in the conditional statements I need to find out if elements of firstarray are in secondarray. The only way I can fathom doing this right now is by starting another loop, i.e. secondarray.each do |y|. Problem is this seems to create constant problems where the outter loop / [0] element is going through the entire inner loop before proceeding on. to it's next element. Maybe as someone suggested earlier today to me, to use break. Haven't had much luck with that yet. If this question makes sense, anyone have some suggestions , comments or anything else that might be helpful ? TIA Stuart