keys %hash; # Reset iterator while (my ($k, $v) = each(%hash)) { ... }