Rupa Ruby wrote: > In ruby, is there any way to read the values from a fileI am actually > giving the values in the code itself. Is there a way to read the value > dynamically f = File.new("aaa.txt", "w") f.puts(10) f.close f = File.new("aaa.txt", "a") f.puts(20) f.close arr = IO.readlines("aaa.txt") x = Integer(arr[0]) y = Integer(arr[1]) puts x+y #30 -- Posted via http://www.ruby-forum.com/.