From: Kris Windham Date: 2008-05-08T07:42:46+09:00 Subject: Re: FasterCSV James Gray wrote: > On May 7, 2008, at 4:55 PM, Kris Windham wrote: > >> >> ,name_first,name_last,email,address_street,address_city,address_state >> \n >> 1,Dave,Wilson,dave@wilson.com,105 Street,Little Rock,AR\n >> 2,James,Stevens,james@stevens.com,205 Street,Dallas,TX\n >> >> I was hoping some one could point in me in the right direction on >> how to >> get started with this. > > What about something like: > > require "rubygems" > require "faster_csv" > > users = FCSV.open("csvs/Users.csv") > addresses = FCSV.open("csvs/Addresses.csv") > joined = FCSV.open("csvs/temp.csv", "w") > > while (user = users.gets) and (address = addresses.gets) > joined << user.fields + address.fields > end > > [users, addresses, joined].map { |csv| csv.close } > > __END__ > > Hope that helps. > > James Edward Gray II That helps immensely. Thank you for your quick response... I have just started using fastercsv as opposed to the built-in csv ... I have a lot yet to do with this, but that gets me started. -- Posted via http://www.ruby-forum.com/.