Perl equivalent to unix's uniq command 
Author Message
 Perl equivalent to unix's uniq command

Does anyone no of away to simulate the unix command uniq in perl on an array

Thanks
Brad.



Thu, 14 Jun 2001 03:00:00 GMT  
 Perl equivalent to unix's uniq command

Quote:

>Does anyone no of away to simulate the unix command uniq in perl on an array

'perldoc -q uniq' would be a pretty obvious start and would lead to this
first hit...

=head1 Found in /usr/lib/perl5/5.00554/pod/perlfaq4.pod

=head2 How can I extract just the unique elements of an array?

--
Sam

 "... the whole documentation is not unreasonably transportable in a
 student's briefcase." - John Lions describing UNIX 6th Edition
 "This has since been fixed in recent versions." - Kernighan & Pike



Sun, 17 Jun 2001 03:00:00 GMT  
 Perl equivalent to unix's uniq command

Quote:

> Does anyone no of away to simulate the unix command uniq in perl on an array

We all do, since it's in the 4th FAQ manual.
From perlfaq4:

     How can I extract just the unique elements of an array?

There are several ways shown there, you pick the one that suits your
need the most.

HTH,
Ala



Sat, 23 Jun 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. perl equivalent of a Unix command line sort?

2. PERL COMMAND Equivalent to Unix COMM

3. 'uniq' in perl

4. uniq command or module for perl??

5. What's the dot-command equivalent?

6. print string like unix command 'more'

7. Perl's open command on unix files

8. Begginer's question: perform unix command.

9. unix tee equivalent in perl

10. Is there perl code equivalent of unix login program

11. Unix Sendmail equivalent for Perl Win32 and NTMail

12. Unix Grep equivalent in Perl

 

 
Powered by phpBB® Forum Software