Your code has two opening curly brackets, but three closing ones. Please, post the real code, otherwise we can not help you. Are you sure you are not calling keys inside the each loop in the real code? That would explain the infinite loop.
Comment on Re: number of keys and values in a hash
hi choroba,
Upto printing number and datainfo is ok, it displying toatl numbers and thier datainfo but after that i need to sotre these numbers into hash so i created hash,but in my hash only one element is there how can use all elements in my hash.