in reply to Modules for magic

If you are trying to make a variable behave magically, one usually uses tie. Tie::Scalar/Tie::Array/Tie::Hash/etc help.