From: Christian Szegedy Date: 2003-01-28T23:01:03+09:00 Subject: Re: Questions from a Ruby Newbie (file io and data structures)... I haven't tested, but it should work. a = [] IO.foreach { |l| l.split(",").each_with_index{ |s,i| (a[i] ||= []) << s } }