On Jun 30, Dan Fish said:

>What is the most efficient (or at least AN efficient :-) way of obtaining a
>slice from an array wherein the slice contains only unique values found in
>the array?

>if @array = (1,3,5,5,3,5,2,1)  then @slice = (1,3,5,2)

This is FAQ.

  perldoc -q unique

  Found in /usr/local/lib/perl5/5.00502/pod/perlfaq4.pod
  How can I extract just the unique elements of an array?

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

Reply via email to