Net::DNS 

lame_fox.png

use Net::DNS;
my $res = Net::DNS::Resolver->new;
my  @mx = mx($res, "example.com");