my $packet = $res->send($domain, 'MX'); foreach my $answer ($packet->answer) { next unless $answer->type eq 'MX'; push @results, $answer->exchange; }
Additionally, depending upon your requirements, it may be worthwhile to return a list of mail exchanges ($answer->exchange) and their respective preferences ($answer->preference).
perl -le "print+unpack'N',pack'B32','00000000000000000000001010011010'"
In reply to Re: MX Record Lookups
by rob_au
in thread MX Record Lookups
by Gerard
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |