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

hash of hashes values and keys

Thread Next
Noah Garrett Wallach
September 4, 2009 13:57
hash of hashes values and keys
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About