http://www.perlmonks.org?node_id=53674


in reply to How do I get the local internet IP address?

FAQ. See How do I find out my hostname, domainname, or IP address?