Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

perlman:Sys::Hostname

by root (Scribe)
on Dec 23, 1999 at 00:53 UTC ( #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
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-12-22 06:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (111 votes), past polls