c has asked for the wisdom of the Perl Monks concerning the following question:
I am in need of finding my local machine's IP address assigned to ETH0. I need to get the information independent of resolving a hostname. Instead, I need to pull information from something similar to ifconfig. I could certainly backtick the command into the code and parse out the information, but I would think there would be a cleaner, easier way. Aside from all of the nodes referencing how to find an ip address using Sys::Hostname, I've only found one that address my needs, and I don't think its the best way of doing things.
Is there a better manner, a module or built-in function that may do the trick?
-c
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: finding ip address without hostname
by pg (Canon) on Dec 11, 2002 at 04:21 UTC | |
Re: Finding an IP Address without the hostname
by cjf-II (Monk) on Dec 11, 2002 at 05:26 UTC | |
Re: finding ip address without hostname
by Abigail-II (Bishop) on Dec 11, 2002 at 10:44 UTC | |
Re: finding ip address without hostname
by Aristotle (Chancellor) on Dec 11, 2002 at 14:24 UTC |
Back to
Seekers of Perl Wisdom