From: Cthulhu __ Date: 2008-06-19T04:28:08+09:00 Subject: Re: parsing text into usablle numerical data Sot he code as taken from Chris' post returns this error: read_data.rb:72:in `[]=': no implicit conversion from nil to integer (TypeError) from read_data.rb:72 from read_data.rb:69:in `foreach' from read_data.rb:69 The code looks like this with line numbers... 69 File.foreach files_to_parse[i].to_s do |line| 70 next if line.strip == '' 71 idx, *dat = line.scan(/\d+/).map {|s| s.to_i} 72 raw_data[idx] = dat 73 end 74 puts raw_data I suspect it may be a problem in the formatting of the data... perhaps there is some way to remove any non-integer characters eg. delimiting chars before parsing? --m -- Posted via http://www.ruby-forum.com/.