in reply to Re: Getting information from an array of hashes
in thread Getting information from an array of hashes
If I put in a line that says
print "$diary_data[0]\n";it prints:
ARRAY(0x3bfda0)If I change the print slightly, like this:
print "@{$diary_data[0]}\n";This is what I get:
HASH(0x3bfdc4)Then if I try
print "%{$diary_data[0]}\n";it gives me:
%{ARRAY(0x3bfdd0)}I don't think I'm understanding this correctly. The first example looks to me like a scalar reference, pulling data out of an array; but since the array contains hashes, then how does this get pulled out? Is this "ARRAY(0x3bfda0)" line an internal reference to how Perl remembers something?
Anyway, I'm off to read perldsc for a while.
Chumley
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Getting information from an array of hashes
by AgentM (Curate) on Apr 25, 2001 at 23:46 UTC |
In Section
Seekers of Perl Wisdom