http://www.perlmonks.org?node_id=452549


in reply to Hash not getting updated

blazar is right. That is the way you need to do it. The reason %hash had only one element in your original loop is because with each iteration of the loop it was being recreated: %hash = ($temp => $temp) .

davidj