Do you know where your variables are? | |
PerlMonks |
Re: Finding the IP of a local boxby robartes (Priest) |
on Sep 14, 2006 at 05:57 UTC ( [id://572872]=note: print w/replies, xml ) | Need Help?? |
On the command line, you would use ifconfig on the appropriate interface to get the IP address. Punching ifconfig into the CPAN search box results in Net::Ifconfig::Wrapper which provides a perl wrapper to ifconfig. I have never used this module myself, so I cannot comment on the quality and stability of it, I'm afraid. Codewise, you would examine the hash returned by IFconfig('list','','','') to get the IP address of your internet facing network interface. CU
In Section
Seekers of Perl Wisdom
|
|