sub run { my $self = Myobj->new(@_); ... $self->set_hshAgg(%hshAgg); ... } # method within object sub myProblem { my %hshAgg = $self->get_hshAgg(); dumpHash(%hshAgg); }