#!/usr/bin/perl
#Program name: example9.pl
#  hash array
%animals = ('Tigers', 10, 'Lions', 20, 'Bears', 30);
print ("The animal counts are:\n");
print ("$animals{'Tigers'}\n");
print ("$animals{'Lions'}\n");
print ("$animals{'Bears'}\n");
#  ==> operator does not work
#%pets = ('dogs' ==> 3, 'cats' ==> 4, 'parrots' ==> 3, 'hamsters' ==> 2);
%pets = ('dogs', 3, 'cats', 4, 'parrots', 3, 'hamsters', 2);
print "\nMy pet counts are:\n";
print ("$pets{'dogs'}\n");
print ("$pets{'cats'}\n");
print ("$pets{'parrots'}\n");
print ("$pets{'hamsters'}\n");
