in reply to Re: Getting all emails
in thread Getting all emails
If I put in a reg expression like this: if($line =~ /\@company\.com/) it works but I need to really search for hits on any of the three listed above.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 =~ /\.(?:company?|aa\.company|bb\.company)\.com$/i) { print "FILE = $_ email = $1\n"; } } close F; } } find( \&wanted, "/dirpath/here" );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (3): Getting all emails
by VSarkiss (Monsignor) on Jun 19, 2003 at 18:53 UTC | |
by Anonymous Monk on Jun 19, 2003 at 19:49 UTC |