package mypackage; my %hash; sub new { my $self = bless \1, $_[0]; $hash{ $self } = 'Initial data'; return $self; }