sub acls { my $self = shift; # my %acls = \$self->{ACLS} # $self->{ACLS} is a hashref # return %acls; return $self->{ACLS}; } foreach(keys %{$mod->acls}) { # code in here }