Nested hashes : Hash Collections « Hash « Perl
- Perl
- Hash
- Hash Collections
Nested hashes
%students=( "Math" => { "A" => 100, "B" => 95 },
"Science" => { "C" => 85, "D" => 76 }
);
print qq/$students{Math}->{Joan}.\n/;
print qq/$students{Science}->{Bill}.\n/;
Related examples in the same category