The answer is found in the POD for Net::DNS::Resolver:
Search...Returns a "Net::DNS::Packet" object, or "undef" if no answers were found. If you need to examine the response packet whether it contains any answers or not, use the send() method instead.
In other words, you need to be checking the return value of search() to know whether you got a valid Net::DNS::Packet object back, or undef, which would indicate no answers were found.
Hope this helps.
Dave
In reply to Re: Net::DNS looping help
by davido
in thread Net::DNS looping help
by svankalken
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |