From: Martin Sharon Date: 2009-04-27T21:50:02+09:00 Subject: Re: How to parse a "line"? :)I am really confused with ruby now. OK, what I want to do is this, let me describe by c input is one line: number city1 city2....city2 for(i=0;i Maybe we don't know exactly what it is you are trying to do. strs > was, in my example, supposed to be a large list separated by new > lines, each containing something like... > > number city city city ... > > I just assumed that you wanted a list with an identifying marker, > which would be most likely a Hash. > > You can iterate over hashes, just like arrays, but the nomenclature > can be different. > > What do you have as data and what do you want to do with it? > > Todd -- Posted via http://www.ruby-forum.com/.