From: Sy Ali Date: 2006-09-11T05:22:04+09:00 Subject: Re: patching strings together to make a variable On 9/10/06, Mike Dvorkin wrote: > How about: > > puts "#{eval('$' + 'var' + (if $a == true then "iable" end))}" > # => pass I can see the value with this, but what if I wanted to add a number to the resulting variable? Something like this: a = "var" b = "iable" $variable = 1 eval('$' + 'var' + 'iable') += 1