Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Here the latest I have but would like assistance on this because it doesnt seem to give me accurate counts:anyname@company.com anynamehere@aa.company.com anynameagain@bb.company.com
print "Total amount of emails found = $ct\n";use File::Find; sub wanted { if( $_ =~ /\.html?$/) { my $name = $File::Find::name; open ( F, $name ) or die "$!: $name\n"; while($line = <F>) { if($line =~ /\.(?:company?|aa\.company|bb\.company)$/) { $ct++; print "Email = $1\n"; } } close F; } } find( \&wanted, "/web/dir/" );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Getting all emails
by VSarkiss (Monsignor) on Jun 19, 2003 at 16:21 UTC | |
by Anonymous Monk on Jun 19, 2003 at 17:55 UTC | |
by VSarkiss (Monsignor) on Jun 19, 2003 at 18:53 UTC | |
by Anonymous Monk on Jun 19, 2003 at 19:49 UTC | |
|
Re: Getting all emails
by Zed_Lopez (Chaplain) on Jun 19, 2003 at 18:38 UTC |