Check out example codes for "perl hash size". It will help you in understanding the concepts better.

Code Example 1

# Perl 

# syntax 
keys %<hash-name>

# example
my %weekly_temperature = (
    monday    => 65, 
    tuesday   => 68,
    wednesday => 71, 
    thursday  => 53, 
    friday    => 60,
);

my $size = keys %weekly_temperature;
print "Size of hash:" . $size;  #[OUTPUT-->Size of hash:5]

Learn ReactJs, React Native from akashmittal.com