in reply to How to create a DNS message in perl?
Use the unpack funtion to convert the name to hex:
$QNAME = unpack("H*", "www.google.com")
For more read:
perldoc -f unpack
and
perldoc -f pack
|
---|
In Section
Seekers of Perl Wisdom