Hash of Hashes with Lists of Values : Hash Collections « Hash « Perl






Hash of Hashes with Lists of Values

    


my $hashptr = { "Teacher"=>{"Subjects"=>[ qw(Science English)]},};
print $hashptr->{"Teacher"}->{"Subjects"}->[0],"\n";
print "@{$hashptr->{'Musician'}->{'Instruments'}}\n";

   
    
    
    
  








Related examples in the same category

1.Hash of list
2.Hash of Hashes
3.List of hash
4.Use hash as an array
5.Nested hashes