Syntactic Confectionery Delight | |
PerlMonks |
Re: Find a networked computer nameby dempa (Friar) |
on Dec 20, 2002 at 13:22 UTC ( [id://221418]=note: print w/replies, xml ) | Need Help?? |
I don't know how portable this is. I'm on Unix. Also, this code needs checking of system call return values before serious use!
Update: The reason I included the calls to gethostby* is in case you want the domainname also. hostname() from Sys::Hostname doesn't always include that. --
In Section
Seekers of Perl Wisdom
|
|