This would work:

i = 0; dir = "/home/leon/"; test = Array.new; test = 
Dir.new(dir).entries.map! { |x| x =~ /filezilla$/ ? x : next  }; 
test.compact

Is the .compact needed? Can't I get rid of that?
-- 
Posted via http://www.ruby-forum.com/.