From: "Thomas T." Date: 2010-12-29T08:19:44+09:00 Subject: Re: convert String "1;2;3;4;5;" to Array Thanks to both. I'm reading up on these methods you've supplied at http://www.ruby-doc.org/core/. It looks like the .map method is a synonym for .collect. I'll read up on .inject next. > you mean something like this? > > "1;2;3;4;5;6;7;8;9;10".split(';').inject([]) { |a,i| a << i.to_i } > => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] > Yes. In fact, both of these work---liking ruby's flexibility here. #data = raw_data.split(/\;/).map { |raw| raw.to_f} #data = raw_data.split(/\;/).inject([]) { |a,i| a << i.to_f } > > looking below, where do 11, 12 come from in the desired result? my inconsistency. Thomas -- Posted via http://www.ruby-forum.com/.