In article <[email protected]> you write:
>Yes, the txtdata() method concatenates with spaces in a scalar context.
Net::DNS is pretty funky. The txtdata() output method is something
that someone apparently thought was useful a long time ago but it's
neither the master file format nor the wire format
Here's what it gives you if you ask for that record formatted for a master file,
or hex of the wire format:
use Net::DNS;
print $Net::DNS::VERSION . "\n";
$rr = new Net::DNS::RR( name => 'name',
type => 'TXT',
txtdata => [ 'multiple', 'strings', 'string with spaces' ]
);
print "master format: "; $rr->print;
print "encoded: ",unpack("H*",$rr->encode(0)),"\n";
$ perl text.pl
1.21
master format: name. IN TXT multiple strings "string with spaces"
encoded:
046e616d650000100001000000000024086d756c7469706c6507737472696e677312737472696e67207769746820737061636573
You get just what you'd expect, no stray spaces in the master record
or in the binary.
--
Regards,
John Levine, [email protected], Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly
_______________________________________________
dns-operations mailing list
[email protected]
https://lists.dns-oarc.net/mailman/listinfo/dns-operations