Looking at your other posting
PERL Binary conversion, I guess you really do mean pointers, not references as others have assumed. See
perlpacktut, in particular "Pointers and how to use them".
The example is easily converted to use a hash, but you need to describe the error you are getting in the previous post before anyone can give a full answer.