in reply to Efficient DNS lookup
You may want to have a look at Net::DNS, I haven't worked with it yet, but it should do what you want.
Hope this helps, -gjb-