From: Wild Karl-Heinz Date: 2004-12-18T00:20:00+09:00 Subject: Re: String expand problem In message "String expand problem" on 17.12.2004, David A. Black writes: DAB> See Bill's answer too. Here's another way, using the %-style value DAB> interpolation in the output string: DAB> DATA = [ DAB> { :fn => 'data.csv', DAB> :sql => %q{ insert into table (id,name) DAB> values ('%s','%s'); } DAB> }, DAB> ] DAB> DATA.each { |d| DAB> File.foreach(d[:fn] ) { |line| DAB> x = line.chomp.split( /\t/ ) DAB> puts(d[:sql] %x) DAB> } DAB> } It's that I was looking for. Thank you. Karl-Heinz