tags:

views:

39

answers:

1
path1="c:/amit_150000.txt"
v=1
fs=File.open("$path"+"#{v}",'w')

Now I have to open that file but I am not able to. Please tell me the problem.

+1  A: 
fs = File.open("#{path1}#{v}",'w') 
zed_0xff
sir cud u plzz explin how it will work
Amit singh tomar
path1="c:/kabab.txt" path2="c:/kabab2.txt" for v in 1..2 puts "#{path}"#{v}" end now tell me how it will create two file
Amit singh tomar
I have posted an answer to [your other question](http://stackoverflow.com/questions/3194447/how-to-solve-this-equation-in-ruby).
mikej