in reply to OO Perl: Methods To Reference Hash
You can't do that. A hash can only have strings for keys, and scalars for values. You can put REFERENCES to hashes in as the values, but then you need to access them accordingly.( ..., hshAgg => %hshAgg ) ... return $self->{hshAgg}; ... $self->{hshAgg} => %hshAgg;
Even yet, returning a whole hash isn't nice; you should return a reference to it, but then your caller has to be modified to expect a reference, too.hshAgg => \%hshAgg ... return %{$self->{hshAgg}}; ... $self->{hshAgg} => \%hshAgg;
--
[ e d @ h a l l e y . c c ]
In Section
Seekers of Perl Wisdom