On Wed, 2004-05-19 at 14:28, Randy W. Sims wrote:
> Jason Dusek wrote:
> > Hi,
> > 
> > Is there an easy way to get all the unique elements of an array? i.e. is 
> > there some module or function that does that sort of thing?
> 
> Hmm, none of the solutions so far have been stable. In other words all 
> the solutions so far modify the order of elements from the source array. 
> How would you implement a version of the function that produced an array 
> where the elements are in the same order and only the first of any 
> duplicates are kept?
> 
> 
> ( a b c d e f g h ) == stable_uniq( a b c d a b e f c g h )


No,
The solution given by some users , ( using no hash keys ) do maintain
order. But in practical sense , I never encountered a case where I
required the unique elements and also the order of an array

Ram





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to