From: Li Chen Date: 2009-09-28T02:41:00+09:00 Subject: Re: Is it possible to eliminate the temporary variable Thairuby ->a, b {a + b} wrote: > Is this work? > > def file_process > @data=[] > File.foreach(@file) {|a_line| @data << a_line.chomp.split(/\t/)} > end Yes, it works and thank you so much. Li -- Posted via http://www.ruby-forum.com/.