Perl-Sensitive Sunglasses | |
PerlMonks |
Re: How do I make an array of hashes?by fx (Pilgrim) |
on Dec 19, 2003 at 23:26 UTC ( [id://315948]=note: print w/replies, xml ) | Need Help?? |
If the hash has already been created, you can store references to the hash in arrays: push(@array, \%some_hash); and then when you pop them off: $hash_ref = pop(@array); you'll get a scalar back which can be dereferenced to get at the values of the hash: $value = $hash_ref->{'key'};
In Section
Seekers of Perl Wisdom
|
|