perlfunc
root
<P>
Sys::Hostname - Try every conceivable way to get hostname
<P>
<HR>
<P>
<PRE> use Sys::Hostname;
$host = hostname;
</PRE>
<P>
<HR>
<P>
Attempts several methods of getting the system hostname and then caches the
result. It tries [perlfunc:syscall|syscall],
<CODE>`hostname`</CODE>, <CODE>`uname -n`</CODE>, and the file <EM>/com/host</EM>. If all that fails it [perlman:perlguts|perlguts]s.
<P>
All nulls, returns, and newlines are removed from the result.
<P>
<HR>
<H1><A NAME="AUTHOR">AUTHOR</A></H1>
<P>
David Sundstrom <<EM>sunds@asictest.sc.ti.com</EM>>
<P>
Texas Instruments
<HR>