The OP code did work for me though on a closed box and Net::Address::IP::Local only seems to work if there is, as the method name suggests, a public address open otherwise it's Unable to create UDP socket: No route to host.... The OP code found the right address on both my running OS X boxes, one closed, one open.
In reply to Re^2: Answer: How do I get the local internet IP address?
by Your Mother
in thread How do I get the local internet IP address?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |