in reply to Re (3): Getting all emails
in thread Getting all emails

Thanks for all your help. It now fetches all as needed. I noticed it doesnt just fetch "aa.company.com" and "bb.company.com". It fetches anything that is in front of "company.com". So if there is an email with "myname@xx.company.com" the reg expression will fetch the "xx.company.com". Any way to correct it so it just fetches the three I mentioned earlier?
anyname@aa.company.com anyname@bb.company.com anyname@company.com
Here is the script that you fixed for me:
use File::Find; sub wanted { local *F; if( $_ =~ /\.html?$/) { my $name = $File::Find::name; open ( F, $name ) or die "$!: $name\n"; while($line = <F>) { if($line =~ /\@(?:aa\.|\.bb)*company\.com/) { print "FILE = $_ ; } } close F; } } find( \&wanted, "/directory/path" );
If this is all that can be done then I do thank you for helping me get this far. Thanks again!