Because $_ is the hash reference, not the index to the array, and $Array[$_] stringifies the hash reference (to something like "HASH(0x200243d4)", which perl interprets as a "very big" number, and then tries to auto allocate that many elements for your array, and runs out of memory.