in reply to How to Ignore an email address with this script.
#!/usr/bin/perl -w use strict; use Net::ParseWhois; # also see Net::Whois my $dom = 'domain.com'; my $w = Net::ParseWhois::Domain->new($dom); unless ($w->ok) { warn "error: " . $w->{'error'} . "\n" if $w->{'error'}; die "No whois match for $dom\n"; } my $c = $w->contacts; # or BILLING or TECHNICAL my $email = (split / / => $c->{ADMINISTRATIVE}[0])[-1]; unless ( index( $email, '@' ) > -1 ) { ($email = $c->{ADMINISTRATIVE}[-1]) =~ s/^Email: //; } print "administrative email address: $email\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (sacked) Re: How to Ignore an email address with this script.
by dru145 (Friar) on Nov 17, 2001 at 01:49 UTC |