On 4/29/10 Thu  Apr 29, 2010  5:15 PM, "Harry Putnam" <rea...@newsguy.com>
scribbled:

>> 
>> The braces ({}) mean that %data is a "hash-of-hashes", i.e., the values of
>> the elements of %data are references to hashes.
> 
> Needless to say, I'm a bit confused here.... googling on `hash of
> hashes' has plenty of hits, but looking through a few, so far has only
> helped confuse me.

Read 'perldoc perllol' and remember that arrays and hashes are similar.
Arrays are indexed by numbers, and hashes are indexed by strings. So most
everything that applies to 'array-of-arrays' applies to 'hash-of-hashes'.
And of course you can have 'array-of-hashes' and 'hash-of-arrays', to any
level.

These are extremely important data structures for Perl programming, so you
should figure out what they are.

Use the Data::Dumper module to see any complex, nested data structure:

    use Data::Dumper;
    my %data;
    ...
    print Dumper(\%data);



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to