Perl hash size

Code examples

1
0

perl hash size

# 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]

Similar pages

Similar pages with examples

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................