my %hash; while (my ($key, $value) = each %hash) { ... }