From: piir@... (Todd Gardner) Date: 2004-06-14T08:43:38+09:00 Subject: Re: How to read a .csv file into a 2D array? Actually this is a tab delimited file, here is the .csv. 6/10/2004,-44.87,4INKJETS.COM 888-321-2552 CA 6/8/2004,-107.26,SAFEWAY STORE00014837 SAN JOSE CA 6/7/2004,-24.95,DR *REGSOFT.COM Regsoft.com GA 6/3/2004,114.96,ONLINE PAYMENT 5/28/2004,214.99,ONLINE PAYMENT 5/27/2004,-114.96,SAFEWAY STORE00014837 SAN JOSE CA 5/24/2004,-214.99,NEWEGG COMPUTERS 800-390-1119 CA 3/9/2004,-40,TQ PHONE ADVANCE - CA How can I do this more elegantly? ary = [] fi = File.open("test1.csv","r") fo = File.open("test1.out","w") fi.each { |line| a = line.strip.split(',') ary << a fo.puts line } #~ # test print-out of one arrayrow i=0 1.times do puts ary[i] i+=1 end fi.close fo.close Thanks again for listening to the newbie question! Todd