On Jul 30, Jeff 'japhy' Pinyan said: >On Jul 30, Kirby_Sarah said: > >>I have instances where I want to delete duplicate elements out of an array. >>Is there an easy way to do this? > >Yes, and the FAQ tells you: > > >http://www.perldoc.com/perl5.6.1/pod/perlfaq4.html#How-can-I-remove-duplicate-elements-from-a-list-or-array-
Or, you can forget about it, and let Perl take care of it for you: use Tie::Array::Unique; tie my(@data), 'Tie::Array::Unique'; # use @data normally You can get the module from my web site. Go to the "modules" section. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. [ I'm looking for programming work. If you like my work, let me know. ] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
