develooper Front page | perl.beginners | Postings from September 2009

hash of hashes values and keys

Thread Next
From:
Noah Garrett Wallach
Date:
September 4, 2009 13:57
Subject:
hash of hashes values and keys
Message ID:
4AA17F1A.4050404@enabled.com
Hi there,

I am trying to figure out how to use hash of hashes properly. can values 
and keys be at the same level?


I am running in to troubles.  Maybe values and keys cant be at the same 
level ?

                 $policy{policy_statement}{$key} = 2;
                 $policy{policy_statement}{$key}{group_name}{$1} = 1;
                 $policy{policy_statement}{$key}{policy_type}{$2} = 1;

the perl error results

Can't use string ("2") as a HASH ref while "strict refs" in use at 
./policy.sanitizer line 174.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About