in reply to Re: How do I get the local internet IP address?
in thread How do I get the local internet IP address?
Or the more perlish (read : normal, not perverted brain have difficulties to understand it)
*grin*
while (@adrs=(gethostent())[4]) { map { $\="\n";print join '.',unpack'C4',$_} @adrs }
BTW I'm sure a Perl Guru, could tell me how to make this even smaller !
Please show me the light !
UPDATE
Ooops ! I suddenly realized that even if MY /etc/hosts contains only entries about my local machine, it might not always
be the case (in fact it should often contains entries about other machines...).
So thousand apologizes, but all my posts in this thread do not resolve the problem...
But my code could be use to get the ip adresses of the machines in /etc/hosts...