From: KingMaker KingMaker on
Text file:
firstName=abcd
lastName=xyz
legalName=test
vendorRepWorkPhone=121212
email=abcd(a)test.com
confirmEmail=abcd(a)test.com

First i read the file and get all values in the data variable.


contents = File.read("c:/test/Flow1.txt")
data = contents.map do |line|
line.chomp.split("=")[1]
end



than put values in the variable like.
@FirstName=
@LastName=
@LegalName=
@VendorRepWorkPhone=
@Email=data
@ConFirmEmail=



i use array for copy the values like
data[0] for first line
data[1] for second line

but it is not good if i have 100 value than i write this for 100 times
in the feature requirement is changed and add some field that time.
problem arise so plz help me..
what is the best solution of this....
--
Posted via http://www.ruby-forum.com/.