> 9.23: How do I find out my hostname/domainname/IP address?
>
>        my $addr = inet_ntoa(scalar gethostbyname($host || 'localhost'));

If the host name is not important, that can be simplified to:

        my $addr = join(".", unpack C4,((gethostbyname "")[4]));
-- 
See http://www.inwap.com/ for PDP-10 and "ReBoot" pages.

Reply via email to