Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

perlman:Sys::Hostname

by root (Monk)
on Dec 23, 1999 at 00:53 UTC ( [id://1241]=perlfunc: print w/replies, xml ) Need Help??

Sys::Hostname

See the current Perl documentation for Sys::Hostname.

Here is our local, out-dated (pre-5.6) version:


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



    use Sys::Hostname;
    $host = hostname;



Attempts several methods of getting the system hostname and then caches the result. It tries syscall, `hostname`, `uname -n`, and the file /com/host. If all that fails it perlgutss.

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


AUTHOR

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

Texas Instruments


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2025-05-17 02:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.