in reply to Search And Export - Perl Needed?

This is what came to mind for me. You could change the line that states my %addrs = map { $_ => 1 } @addrs to my %addrs; @addrs{@addrs} = (1) x @addrs; to do a hash slice instead. I just felt like a map ;)

#!/usr/bin/perl -w use strict; my $addrs = do { local $/; <DATA> }; my @addrs = grep { !/domain\.com\z/ } $addrs =~ /"(\w+\@[\w\.]+)"/g; my %addrs = map { $_ => 1 } @addrs; print join("\n", keys %addrs), "\n"; __DATA__ ","lliu5@yahoo.com","lliu5@yahoo.com","SMTP","support@domain.com","sup +port@do= main.com","SMTP" ","ishmale423@excite.com","ishmale423@excite.com","SMTP","support@doma +in.com"= ,"support@domain.com","SMTP"


If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, please reply to this node or /msg me to inform me as to what is wrong with the post, so that I may update the node to the best of my ability.

Replies are listed 'Best First'.
Re: Re: Search And Export - Perl Needed?
by Anonymous Monk on May 11, 2003 at 19:29 UTC
    Cheers for that. Even better, could the addresses be piped straight to sendmail?