DB<1> @elements = qw/ 1 3 5 4 6/; DB<2> $hash1{$_}++ for @elements; DB<3> x \%hash1 0 HASH(0x600509af0) 1 => 1 3 => 1 4 => 1 5 => 1 6 => 1