in reply to Clearing memory

Why are you using FileHandle? Net::DNS::ZoneFile will open the file for you.