P is for Practical | |
PerlMonks |
Re: making arrays that act like hashes at runtimeby perrin (Chancellor) |
on Jul 01, 2002 at 13:45 UTC ( [id://178549]=note: print w/replies, xml ) | Need Help?? |
You may be able to get what you need by using the enum module. It would let you do this:
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.
In Section
Seekers of Perl Wisdom
|
|