1Sys::Hostname(3pm)     Perl Programmers Reference Guide     Sys::Hostname(3pm)
2
3
4

NAME

6       Sys::Hostname - Try every conceivable way to get hostname
7

SYNOPSIS

9           use Sys::Hostname;
10           $host = hostname;
11

DESCRIPTION

13       Attempts several methods of getting the system hostname and then caches
14       the result.  It tries the first available of the C library's gethostā€
15       name(), `$Config{aphostname}`, uname(2), "syscall(SYS_gethostname)",
16       `hostname`, `uname -n`, and the file /com/host.  If all that fails it
17       "croak"s.
18
19       All NULs, returns, and newlines are removed from the result.
20

AUTHOR

22       David Sundstrom <sunds@asictest.sc.ti.com>
23
24       Texas Instruments
25
26       XS code added by Greg Bacon <gbacon@cs.uah.edu>
27
28
29
30perl v5.8.8                       2001-09-21                Sys::Hostname(3pm)
Impressum