in reply to Perl class - how to create instance variable instead of class variable
I am surprised that test1 "steps on" test because the hash keys are different for test and test1.
The hash keys are the same in both instances, namely theValue according to your code. What should have been different (but wasn't) are the hashes, namely the anonymous hashes references to which are your objects $test and $test1.
Anno
|
---|