-------------------------------
#!/usr/bin/perl
use warnings;
use strict;

open ALLNAMES, "emails.txt" or die "File: infile failed to open: $!\n";
my @allnames = <ALLNAMES>;
chomp @allnames ; # I don't know why, but seems you need this

my %seen = ();
my @unique = grep { ! $seen{ $_ }++ } @allnames;

print "@unique";

close ALLNAMES or die "cannot close infile";
-----------------------------------------

HTH


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to