You have gotten a couple of responses to your question. I wanted to point out that there is a cpan module that might provide you more options (
Net::DNS) for DNS resolution than inet_aton. Net::DNS implements another DNS resolver that can be used if you want to do things like control which name server or servers are used to resolve DNS queries.