I keep printing my hash as # of buckets / # allocated. How do I print the contents of my hash?
Without using a while loop would be most preferable (for
while
Easy:
print "$_ $h{$_}\n" for (keys %h);
Elegant, but actually 30% slower (!):
while (my ($k,$v)=each %h){print "$k $v\n"}