Sys::Hostname(3p) Perl Programmers Reference Guide Sys::Hostname(3p)
Sys::Hostname(3p) Perl Programmers Reference Guide Sys::Hostname(3p) # Sys::Hostname(3p) Perl Programmers Reference Guide Sys::Hostname(3p) NNAAMMEE # Sys::Hostname - Try every conceivable way to get hostname SSYYNNOOPPSSIISS # use Sys::Hostname; $host = hostname; DDEESSCCRRIIPPTTIIOONN # Attempts several methods of getting the system hostname and then caches the result. It tries the first available of the C library's ggeetthhoossttnnaammee(()), "`$Config{aphostname}`", uunnaammee(2), "syscall(SYS_gethostname)", "`hostname`", "`uname -n`", and the file _/_c_o_m_/_h_o_s_t. If all that fails it "croak"s. ...