From: "Berger, Daniel" Date: 2002-05-04T06:43:10+09:00 Subject: dynamically assigning instance variables Hi all, Yep, still trying to unwrap my brain from Perl and re-wrap it in Ruby... Is there a way to dynamically assign instance variables? class SomeClass def initialize(hash) hash.each do |key,val| @#{key} = val # Doesn't work end end end Is there a better way to do this? Thanks in advance. Regards, Dan