in reply to Add distinct elements to an array

Use a hash