programming-examples/perl/Hash/Hash of Hashes with Lists of Values.pl

4 lines
177 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
my $hashptr = { "Teacher"=>{"Subjects"=>[ qw(Science English)]},};
print $hashptr->{"Teacher"}->{"Subjects"}->[0],"\n";
print "@{$hashptr->{'Musician'}->{'Instruments'}}\n";