[Israel.pm] exists item in array

Amir E. Aharoni amir.aharoni at gmail.com
Fri Oct 12 02:45:39 PDT 2007


On 08/10/2007, Ernst, Yehuda <yernst at nds.com> wrote:
> Hello!
>
> I want to enter items to array only if they does not exits there(i need 1 item of each type)
>
> if i have     a b c d d d c
> the array will have
>
> a b c d
>
> i saw the function exists but it is for hash not array  (% not @)
>
> does perl have it also for array (@) type?

There was a very similar discussion on this list recently:

http://perl.org.il/pipermail/perl/2007-August/thread.html#8924

The issue of performance on large lists was also discussed.

Maybe it should be a FAQ of some kind ...



More information about the Perl mailing list