in reply to 'Not a HASH reference' error using Objects

Welcome to the Monastery, irwin.

The problem is on this line:

bless \$self, $class;

Here, $self is a scalar which contains a reference to a hash. What you bless, is a reference to $self (\$self) instead of $self. The line should be:

bless $self, $class;

Replies are listed 'Best First'.
Re^2: 'Not a HASH reference' error using Objects
by irwin (Novice) on Jan 14, 2009 at 22:31 UTC
    I just knew it was gonna be something simple! thanks for the solution and thanks for the warm welcome. I think I'm going to like it here. :-)