From: stefan heinrich Date: 2013-07-10T00:13:47+09:00 Subject: create variables depending on counter Hi community, First of all sorry for my english and I hope you get what I want to say. As an example let us say I have an Array like this: Car Dog Car Car Dog What i want to do is I want to collect all Cars in a new Array and all Dogs in a new Array, too. So I need two new Arrays to do this. With Array.uniq.length I get the number of my new Arrays I need. Is there a way to implement this that the programme counts the uniq elements in the array and creates variables depending on the counter. So difficult to explain. I hope anyone can help me. Thanks -- Posted via http://www.ruby-forum.com/.