From: Shekar Ls Date: 2009-08-17T16:17:48+09:00 Subject: Re: Reading contents of a file and storing 7stud -- wrote: > 7stud -- wrote: >> Shekar Ls wrote: >>> >>> Since i am new to programming lang, i dont know how to write a regex. >>> I am looking for output like this >>> >>> a = "http://localhost" >>> b = "User@htmdec.com" >>> >>> where a & b are variables i am storing these values into. >> >> You would never do that. > > Well, I guess that's not true. You can do this: > > results = ["hello", "hi", "goodbye"] > a, b, c = results > puts a, b, c > > --output:-- > hello > hi > goodbye ----------------------- HI, Let me be more clear over the requirement , my intention to read from a remote file & store the values into a variable so that i can make use of these variables for my automation. let me try reading this array using a File.open if it works!! -- Posted via http://www.ruby-forum.com/.