File 1: test.tpl
Hello,#{name}!
File 2: test.rb
name = "jack"
f = File.open("test.tpl")
puts f.read
puts "Hello,#{name}"
f.close
And the result is:
Hello,#{name}!
Hello,jack!
How to change the "#{name}" to "jack"?
--
Posted via http://www.ruby-forum.com/.