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.
In reply to Re: Search And Export - Perl Needed?
by Coruscate
in thread Search And Export - Perl Needed?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |