My idea would be to pass the array to a funstion, manipualte the contents of each element and put it into a hash on the fly. That way, you could have one generic function, which would make your code much simpler, and much smaller too. However, if you want more info on array of hashes, hope this site proves useful All the best!
we're born with our eyes closed and our mouths wide open, and we spend our entire life trying to rectify that mistake of nature. - anonymous.