, I guess you really do mean pointers, not references as others have assumed. See
, 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.