From: Jesse Crockett Date: 2008-07-12T03:38:35+09:00 Subject: Working on a first plain Ruby script, need help with `join' I need help in the block to create a csv file of these entries. the file, abridged: @verb_index = " aah v 1 1 @ 1 0 00865776 abacinate v 1 1 @ 1 0 02168378 abandon v 5 4 @ ~ $ + 5 5 02228031 02227741 02076676 00613393 00614057 abase v 1 3 @ ~ + 1 0 01799794 abash v 1 3 @ ~ + 1 0 01792097 . . . zone v 2 3 @ ~ + 2 0 02512150 00332835 zonk_out v 2 2 @ ~ 2 0 00023868 00016855 zoom v 3 3 @ ~ + 3 1 02055521 02056209 01943718 zoom_along v 1 1 @ 1 0 02055521 zoom_in v 1 1 @ 1 0 02153253 " @verbs_array = @verb_index.split(/\n/) @verbs_array.each do |n| n.split n.join(", ") # fails # How do I output the lines into a verb_index.csv file ? end -- Posted via http://www.ruby-forum.com/.