Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 wandering the Monastery: (4)
As of 2024-04-19 03:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found