Hi
Here I am again.

I have a file with the line '#{a}' in it.
I would like the variable 'a' to be evaluated
when printed.

cat t
#{a}
irb(main):001:0> a=5
5
irb(main):002:0> l=IO.readlines("t")
["#{a}\n"]
irb(main):003:0> puts l[0]
#{a}
nil
irb(main):004:0> puts "#{a}"
5


How would I go about getting the #{a} to evaluate here.
I'm trying to find a nice way for ruby to substitute
values into variables without using regex.

Thanks

=========================================================
Jim Freeze
jim / freeze.org
---------------------------------------------------------
Today is a fine day for Ruby programming.
http://www.freeze.org
=========================================================