programming-examples/perl/Hash/Nested hashes.pl

6 lines
209 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
%students=( "Math" => { "A" => 100, "B" => 95 },
"Science" => { "C" => 85, "D" => 76 }
);
print qq/$students{Math}->{Joan}.\n/;
print qq/$students{Science}->{Bill}.\n/;