I have 4 hash tables and I want to loop through array and then through each hash table.
Array of Hashes:
@array = (%hash0, %hash1, %hash2, %hash3); for($i = 0; $i < 4; $++) { foreach $key(key "%hash[$i]" or "$array[$i]") { print "$key\n"; } }
I know that %hash$i isn't the correct way to do this, but how do I do this? Let me know if I can provide any other information.
In reply to Loop through array of hashes by rjulich
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |