How to get the size of a hash in Perl?

To get the hash in Perl ,

%hash=(
     a=>'Max',
     b=>'Rac',
     c=>'Neo'
);
print scalar keys(%hash);

The out put will be as follows:

3

Leave a Reply