x = 1varname = "x"eval(varname) # => 1eval("varname = '$g'") # Set varname to "$g"eval("#{varname} = x") # Set $g to 1eval(varname) # => 1