You have to do it under no strict 'refs', and you make it basically a soft reference (variable resolved from a string). Also you need to watch how $package is in the string. This should work for you.
my $package_name = 'some_package'; { no strict 'refs'; print Dumper(\%{"main::${package_name}::"}); }
In reply to Re: Symbol table dereference
by stvn
in thread Symbol table dereference
by shemp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |