http://www.perlmonks.org?node_id=724375


in reply to Re: How to create DNS packet
in thread How to create DNS packet

There's prior art here on PerlMonks on this question. Have a look through How to create a DNS message in perl?