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
Comment on
Re: Hash not getting updated
Select
or
Download
Code
In Section
Seekers of Perl Wisdom