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

Q&A > network programming > How do I get the local internet IP address? - Answer contributed by AgentM

If you simply want to send yourself something, use the loopback address (127.0.0.1).