From: Oscar Gon Date: 2006-08-09T23:43:22+09:00 Subject: Re: Question on how to source a file with variables in it. Ezra Zygmuntowicz wrote: > The only way to do it with plain old local variables that I know of > is to use eval. > > > def load_vars(filname) > eval(File.open(filename).read) > end > > -Ezra Thanks Ezra, that's exactly what I was looking for. I'll give it a try! @ hemant kumar Thanks, I took a look at the yaml page but I'm not sure how I would use that in ruby. I understand the syntax that's used in YAML (I think) but I'd still be left wondering how to read that into all/any of the ruby scripts I need. -- Posted via http://www.ruby-forum.com/.