The fact is that the problem was not solved on stackoverflow. Yes you presented considerably arguments why hashes and not arrays, but I was also wondering why is my @arr changing and it was not asked. I do not think that cross posting is bad, since there may be another peoples on perlmonks and stackoverflow, and as more answers/ideas/solutions the better.