#!/usr/bin/perl -w use strict; use Socket; my $host = "noresolve"; my $i = gethostbyname($host); my $ip = inet_ntoa($i); print "Failure!\n" unless ( $ip );