in reply to Perl class - how to create instance variable instead of class variable

If you'd used strict and warnings you'd have gotten griped at that you're accessing the undeclared variable %self. You want to be dereferencing the hashref in the scalar $self instead (i.e. $self->{theValue}).

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.