```{index} single: bucket_info (Hash::Util) ``` ```{index} single: Hash::Util::bucket_info ``` # bucket_info Return a flat list summarising the hash's bucket layout. ## Synopsis ```perl my ($keys, $buckets, $used, @length_counts) = bucket_info(\%hash); ``` The first three values are the number of keys, the total bucket count, and the number of used buckets. Each `$length_counts[$n]` that follows is the number of buckets holding exactly `$n` keys, so `$length_counts[0]` is the empty-bucket count, `$length_counts[1]` the count of single-key buckets, and so on. Given `undef`, it reports on the interpreter's shared string table. Returns the empty list for any other argument that is not a reference to a plain, non-magical hash. When the hash's bucket array has not been allocated yet, only the three leading values are returned.