Binary package “libhash-safekeys-perl” in ubuntu mantic
Perl module to get hash contents without resetting each iterator
Hash::SafeKeys provides alternate functions to access the keys, values, or
entire contents of a hash in a way that does not reset the iterator, making
them safe to use in such contexts:
.
while (my($k,$v) = each %hash) {
...
@k = sort safekeys %hash; # Can do
@v = grep { /foo/ }, safevalues %hash; # No problem
print join ' ', safecopy %hash; # Right away, sir
}