in reply to making arrays that act like hashes at runtime
That puts the constants in the package namespace though, which you might not want. It's good for making objects based on array refs. If this isn't what you're after, try ArrayHashMonster.use enum qw(first=1 second); my @foo; @foo[first, second] = qw(hello world);
|
|---|