in reply to Seeking explanation on assigning a hash to a scalar
use strict; use warnings; my %hash = (a => 1, b => 2, c => 3); my $buckets = %hash; my $elems = () = %hash; print qq{ Buckets: $buckets\nElements: $elems\n};
which prints
Buckets: 3/8 Elements: 6
I hope this is of interest.
Cheers,
JohnGG
|
|---|