Your question makes me wonder if I'm missing something.
Specifying a nameserver instead of using
things like
gethostbyname and letting the OS do the lookups
for you on whatever servers it's configured to use can lead
to problems. For example, if
your nameservers change, you now have one additional place
you need to remember to change that information, and if
you move this script to a different machine, you'll likely
need to update it again.
This is not to say there are no valid reasons for doing so,
but none are coming readily to my mind.
hdp.