in reply to Re: Getting net addy on localhost?
in thread Getting net addy on localhost?

Nifty idea, but the problem with this approach is that you still need to know the world-resolvable name of the machine. You cannot call Net::hostent::gethost() without a host name to resolve. eg.

perl -MNet::hostent -e '$host = gethost(); print $host->name, "\n"' Not enough arguments for Net::hostent::gethost at -e line 1, near "()" Execution of -e aborted due to compilation errors.

Ooohhh, Rob no beer function well without!