laziness, impatience, and hubris | |
PerlMonks |
Re: If I have an array of hashes, how can i store one into a variable?by snowcrash (Friar) |
on Apr 17, 2001 at 11:28 UTC ( [id://73066]=note: print w/replies, xml ) | Need Help?? |
it doesn't work because you don't have an array of hashes,
but an array of references to hashes. arrays can only contain
scalar values in perl. to get the hash the first element of the array refers to, use my %hash1 = %{ $hashes[0] }; checkout perldata, perlref, perllol etc. cheers snowcrash //////
In Section
Seekers of Perl Wisdom
|
|