in reply to Array of hashes

There is no first key in your hash - a hash by its very nature has no absolute first entry. keys will return a list of all keys in the hash in no particular order. You could therefore collect both sets of keys in arrays, and then splice them together. You could also use each. You could then cycle over them with Foreach Loops.

However, this sounds like an XY Problem. Why do you want to cycle over the lists? Chances are your final task in documented in perlfaq4 - my guess is How do I test whether two arrays or hashes are equal?.

As a side note, see how your array index got linkfied? The characters [ and ] have special meaning on this site - this is discussed in the text below the field where you typed your post. See Markup in the Monastery.