>I need it as a sorted array 90% of the time. Some of
>the time I need/want to add a unique element. So, what do I do, keep
>it as an array and sort every time I access it? Keep two copies one as
>the hash the other as an array?

Yep.  This is *not* a glaringly common data structure.  I can think
of a dozen of comparable utility.  Some of them I'm really quite
fond of.  They also do not deserve to be crammed into each and
everyone's /usr/bin/perl or brains.

--tom

Reply via email to