in reply to Hash reference question

If you print out $h you will see that it displays something like "HASH(0x123a)", but if you print %$h your hash will print out. You can access keys by $$h{key}.

If all you are passing is the hash you do not need to use a refrence. Just leave your code the way it is and pass the hash. If you are passing more then the hash to the array it is best if you use refrences. Just change all $h to $$h and all %h to %$h.