[Date Prev][Date Next][Thread Prev][Thread Next]
[Search]
[Date Index]
[Thread Index]
[MacPerl] How to get the TCP/IP host name
- To: <mac-perl@iis.ee.ethz.ch>
- Subject: [MacPerl] How to get the TCP/IP host name
- From: Milivoj Ivkovic <mi@alma.ch>
- Date: Tue, 30 Mar 1999 11:38:29 +0200
- In-Reply-To: <199811241528.EAA22739@cyclops.xtra.co.nz>
Hello,
I'm trying to do a little sub to get the host and domain name, and would like it to run on Macs too.
Unfortunately I don't have a Mac to try it out. Would someone know which of these would work on a Mac:
gethostbyname('localhost'); # OK on Win32, not Linux
`hostname` # OK on Linux, not Win32
$ENV{'HOSTNAME'} # OK on Linux, not Win32
And if you happen to know for other OSes as well, I'm interested too, of course.
Thank you.
M.
===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org