From: google@... (Tom Payne) Date: 2003-01-17T20:25:38+09:00 Subject: Feature request: Array.to_h (2nd part!) Hit post by accident! The full final example: header_row = "year,month,day,price\n" index_of = header_row.chomp.split(',').to_h.invert # => {"month"=>1, "price"=>3, "day"=>2, "year"=>0} data_row = "2002,1,17,1.5\n" cells = data_row.chomp.split(',') cells[index_of['year']] # => "2002" Cheers, Tom