($a, $b, $c, $d) = unpack('C4', ((gethostbyname('localhost'))[4])[0]); print "$a.$b.$c.$d\n";