1N/A# From: asherman@fmrco.com (Aaron Sherman) 1N/A# This library is no longer being maintained, and is included for backward 1N/A# compatibility with Perl 4 programs which may require it. 1N/A# In particular, this should not be used as an example of modern Perl 1N/A# programming techniques. 1N/A# Suggested alternative: Sys::Hostname 1N/A if (
open(P,
"hostname 2>&1 |") && (@
tmp = <P>) &&
close(P))
1N/A elsif (
open(P,
"uname -n 2>&1 |") && (@
tmp = <P>) &&
close(P))
1N/A die "$0: Cannot get hostname from 'hostname' or 'uname -n'\n";
1N/A close P;
# Just in case we failed in an odd spot....