From: 12 34 Date: 2007-07-01T13:00:40+09:00 Subject: Test equality of each element in an array I want to see if any element of an array is equal to a file extension Something like require 'find' require 'FileUtils' src="/folder/on/drive/which/contains/other/folder/and/files" dest ='another place' extNot2move = %{jpg,JPG,pdf,PDF,MRW} Find.find(src) do |fn| if File.file?(fn) if extNot2Move.{any of the elements} == File.extname(fn) ## this is the test I'm interested in FileUtils.Move(src, dest) end end I think I could do it with a extNot2Move.each with a block following, but it seems like their should something more concise. Thanks from a Ruby newbie -- Posted via http://www.ruby-forum.com/.