Perl Diver 2.31
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Sys::Hostname

Name Sys::Hostname
Version 1.20
Located at /usr/lib64/perl5
File /usr/lib64/perl5/Sys/Hostname.pm
Is Core Yes
Search CPAN for this module Sys::Hostname
Documentation Sys::Hostname
Module Details Sys::Hostname

NAME

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


SYNOPSIS

    use Sys::Hostname;
    $host = hostname;


DESCRIPTION

Attempts several methods of getting the system hostname and then caches the result. It tries the first available of the C library's gethostname(), `$Config{aphostname}`, uname(2), syscall(SYS_gethostname), `hostname`, `uname -n`, and the file /com/host. If all that fails it croaks.

All NULs, returns, and newlines are removed from the result.


AUTHOR

David Sundstrom <sunds@asictest.sc.ti.com>

Texas Instruments

XS code added by Greg Bacon <gbacon@cs.uah.edu>

Perl Diver brought to you by ScriptSolutions.com © 1997- 2024