in reply to How can I make a string unique (quicker than my approach at least)

While most answers have concentrated on the ambiguity of preserving order or not - which you never clarified - there is another aspect to consider about uniqueness.

Are nick-john-helena and john-helena-nick really considered two different solutions?

If not, you'll need to sort the result set.

Goes without saying that solutions preserving order are overkill in that case.

FWIW: afaik, my hash solution should always return the keys in the same randomized order , hence sorting wouldn't be strictly necessary. At least within the limits of the same process.

But personally I'd rather play safe and sort.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery