anand kumar am Montag, 6. Februar 2006 08.34:
> Hi all
>
>              I have an array with hundreads of elements in it. Can anyone
> suggest the easiest way to keep only the duplicate elements in the array.

Hi Anand

Depends a bit if you want to keep all duplicates of a duplicate element or 
just one of it. Your question is not clear in this respect.

An easy way would be to consult the perlfaq:

perldoc -q 'duplicate'


hth,
joe

-- 
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