#!/usr/bin/perl use Socket; my $server = shift @ARGV; my $pip = gethostbyname($server); my $IP_add = inet_ntoa($pip); print $IP_add;