I, being too lazy to look up a perl function, would use hostname command in
backticks like so:

$HostID = `hostname`;

Not sure if that will catch a newline character so I would also follow it
with this:

$HostID =~ s/\n//;

-----Original Message-----
From: Bret Goodfellow [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 09, 2005 3:36 PM
To: beginners@perl.org
Subject: host id


Simple question to answer, I hope. I am running on an HP-UX system, and
would like to retrive the UNIX system's host-id (name of box). Is there
a function to do this?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to