in reply to Re: Is there an easy way to assign guaranteed unique values to a simple array without looping through whole array?
in thread Is there an easy way to assign guaranteed unique values to a simple array without looping through whole array?

Thanks Skeeve! I tried your code and see that it works, but I don't understand how the

unless $seen{$value}++

works with the autoincrement. Is there an explanation you could point me to?

memnoch

UPDATE: Okay, I understand it now....I didn't realize that the autoincrement was assigning a value to the hash key that was incremented each time the code runs into the same key. That's very clever! I'm all set. Thank you!

Gloria in Excelsis Deo!
  • Comment on Re^2: Is there an easy way to assign guaranteed unique values to a simple array without looping through whole array?
  • Download Code