jdlev has asked for the wisdom of the Perl Monks concerning the following question:

This one has me stumped. Maybe I'm going about it wrong. Let's say one has multiple hashes of data to iterate through, but the number of hashes can change. For right now, we'll say you have a total of 4 hashes to iterate through.

How would one have perl populate 4 foreach loops? Or is there a better way to iterate through the hashes that I'm not thinking about.

Basically, I want perl to build this for me:

foreach one(hash one) { foreach two(hash two) { foreach three(hash three) { foreach four(hash four) {} } } }
I love it when a program comes together - jdhannibal