After perusing Net::Address::IP::Local, I think that perhaps you are getting back Socket::INADDR_ANY, which is likely "\0\0\0\0", which is a true value.
I expect that the next thing that your code does is to call Socket's inet_ntoa(). So you could also provide a default if that returns "0.0.0.0".
- tye
In reply to Re: How to handle Net::Address::IP::Local'->public when we are not connected to internet (INADDR_ANY)
by tye
in thread How to handle Net::Address::IP::Local'->public when we are not connected to internet
by ppp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |