Keep It Simple, Stupid | |
PerlMonks |
Re: Perl class - how to create instance variable instead of class variableby Anno (Deacon) |
on Aug 29, 2007 at 17:39 UTC ( [id://635878]=note: print w/replies, xml ) | Need Help?? |
Fletch has already pointed out the basic error. One of your comments seems to indicate another, probably related, misunderstanding. You write:
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
In Section
Seekers of Perl Wisdom
|
|