vxp has asked for the wisdom of the Perl Monks concerning the following question:
however, i need _unique_ addresses. in the bounce file that i am parsing with this i could have some@address.com on line #478 and then the same email address one thousand lines down the file. i want (or, rather, need) only one occurence of each address. help please :-)#!/usr/bin/perl use Email::Find; $file = shift; open (FILE, $file) or die "Couldn't open filename: "; while (<FILE>) { $text = $_; my $finder = Email::Find->new(sub { my($email, $orig_email) = @_; print "".$email->format."\n"; return $orig_email; }); $finder->find(\$text);
edited: Mon Jul 29 13:39:54 2002 by jeffa - title change
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help!
by flocto (Pilgrim) on Jul 29, 2002 at 13:33 UTC | |
by talexb (Chancellor) on Jul 29, 2002 at 13:38 UTC | |
by frankus (Priest) on Jul 29, 2002 at 14:03 UTC | |
|
Re: Finding Unique E-Mail addresses
by talexb (Chancellor) on Jul 29, 2002 at 13:27 UTC | |
|
Re: Help!
by twerq (Deacon) on Jul 29, 2002 at 13:31 UTC | |
|
Re: Finding unique email addresses (was: Help!)
by vxp (Pilgrim) on Jul 29, 2002 at 14:17 UTC |