<div dir="ltr"><div><div>Simply handle the exception:<br><br> use Net::DNS::ZoneFile;<br><br> my $zonefile = new Net::DNS::ZoneFile($filename);<br><br> while ( my $rr = eval{ $zonefile->read } || $@ ) {<br> print($@) && next if $@;<br><br> $rr->print; # or whatever<br> }<br><br></div><br></div>At the moment you get the full confession. I will tone it down in next revision.<br><div><div><br><br><div><div class="gmail_extra"><div><div dir="ltr">Dick Franks<br><span><font color="#888888">________________________<br>
</font></span><br></div></div>
<br><div class="gmail_quote">On 27 October 2014 04:02, Chris Buxton <span dir="ltr"><<a href="mailto:clists@buxtonfamily.us" target="_blank">clists@buxtonfamily.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>I'm trying to parse MS DNS zone files using Net::DNS::Zonefile, but it's having issues with two non-standard Microsoft additions to the format:</div><div><br></div><div>1. Age values. For example:</div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Menlo">_kerberos._tcp.direktion._sites.dc._msdcs [AGE:3627351] 600 SRV 0 100 88 <a href="http://atzt0009.at.zurich.com" target="_blank">atzt0009.at.zurich.com</a>.</div></div><div><br></div><div>2. WINS records. For example:</div><div><br></div><div><div style="margin:0px;font-size:11px;font-family:Menlo">@ 0 WINS L2 C900 (</div><div style="margin:0px;font-size:11px;font-family:Menlo"> 192.168.47.221</div><div style="margin:0px;font-size:11px;font-family:Menlo"> 192.168.47.222 )</div></div><div><br></div><div>I don't actually need these data points. I just need to have Net::DNS::ZoneFile::read not fail (return null) when encountering them. I have a lot of this data, such that it would be painful to rely on manual remediation. Does anyone have any ideas?</div><div><br></div><div>Thanks,</div><div>Chris Buxton</div></div><br>_______________________________________________<br>
net-dns-users mailing list<br>
<a href="mailto:net-dns-users@nlnetlabs.nl">net-dns-users@nlnetlabs.nl</a><br>
<a href="https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users" target="_blank">https://www.nlnetlabs.nl/mailman/listinfo/net-dns-users</a><br></blockquote></div><br></div></div></div></div></div>