[ Date Index ][
Thread Index ]
[ <= Previous by date /
thread ]
[ Next by date /
thread => ]
There are several options. Look at gethostbyname, perldoc -f gethostbyname will give you the doc. Also look at Net::hostent (standard module), man Net::hostent contains some examples. Clive -----Original Message----- From: John Horne [mailto:j.horne@xxxxxxxxxxxxxx] Sent: 25 February 2004 17:57 To: LUG Devon/Cornwall Subject: [LUG] Perl NIC subroutine? Hello, Does anyone know of any perl module/subroutine which will return the network interfaces (IP addresses) of the local system? Given, for example, a system with interfaces lo and eth0 - I would like to know what the IP adresses are (not too worried about 'lo'). Secondly, it needs to be from 'standard' perl (version 5 onwards), that is, not some obscure module which the user has to download and install :-) I've had a quick look for this at lunchtime but found nothing. I have the feeling that it exists and probably as some existing standard system subroutine (i.e. part of Sys:: or some such). Thanks, John. -- --------------------------------------------------------------- John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 E-mail: John.Horne@xxxxxxxxxxxxxx Fax: +44 (0)1752 233839 -- The Mailing List for the Devon & Cornwall LUG Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the message body to unsubscribe. ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ -- The Mailing List for the Devon & Cornwall LUG Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the message body to unsubscribe.