Carlos Delmar wrote: >> I'm not really sure what you're up to. Can you elaborate? > > I'd like the output of process_transaction as a long string. But I > don't completely understand the post from Kevin: > >> output = "" >> ... >> output << line_of_file..... >> ... >> return output > > where does this go? > > If the method works I would like to apply it to each line of > transactions array and output the result to a new file. > > here's the latest version of the script: > http://rafb.net/paste/results/D632e199.html The parts after "or" will never be called because each returns the Enumerable. You have several options; one of is replacing "puts" by "return" and remobing "or". In the calling block you can then process the string return value as needed. For example you can do puts transactions.map do |member| process_transaction(member) end This will print each result on a single line. Or you can do puts transactions.map do |member| process_transaction(member) end.join to get a single long string. There are lots of alternatives... Kind regards robert