in reply to Hash is appending old and new data

It seems to me (without a thorough understanding of what you're actually doing) that the problem is you're declaring @outlist outside of the loop, then for every line in OUT you're pushing more data onto @outlist and then printing the whole thing. If you move the my @outlist inside the while where you declare your hash, or if you move the print @outlist outside of the loop, you should only get each item once.