in reply to How to dynamically (yet structurally) creat a hohohohoh

Going way back to code from (tye)Re: varying length multi-dimensional hashes, I'd use:

my $ref= \\%pkg; for my $key ( split /::/, $pkg ) { $ref= \$$ref->{$key}; } $$ref= $pkg;
in the middle of your code.

        - tye (I keep that filed away under "real use for \\")