I have this script to get the IP address of a remote computer. You don't ned
any additional modules for this.

# Resolves IP address from host name
# Specify target computer as argument to the script 
# (with or without preceding '\\')

use Socket;

$computer = "$ARGV[0]" ; 
die "\nHost name must be given as argument to script ! \nSyntax example :
perl $0 hostname\n" if !($ARGV[0]) ;

$computer = substr($computer,2,) if (substr($computer,0,2) eq "\\\\") ;

$ip = inet_ntoa(inet_aton($computer)) ; 
print "\nIP address of computer [$computer] is : $ip\n" ;


-----Original Message-----
From: Craig S Monroe [mailto:[EMAIL PROTECTED]]
Sent: 03 December 2001 18:10
To: Beginners@Perl (E-mail)
Subject: Getting IP info on a Win32 platform


I looked in PPM, but could not find a package that seemed to match.
I am looking for  a package that helps access the IP info on a windows
machine.
Any direction or help would be great. Thanks.
Craig
[EMAIL PROTECTED]
Pager
Numeric: 1-877-895-3558
Email pager: [EMAIL PROTECTED]
--------------------------------------------------------------
You will never find time for anything.
If you want time, you must make it.

Charles Buxton



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to