qazwart has asked for the wisdom of the Perl Monks concerning the following question:
What is the best way of finding the Ethernet address? I looked at a CPAN module, but noticed it had the code:
embedded in it. Yuck!qx(ipconfig /all)
I need a solution that works on Solaris, Windows XP, Windows 2000, Linux, and Mac OS X (I just threw the last one in, but why not? I do want a universal solution)
Is there some Perl module that does this in a fairly clean way? Can you use "getbyaddr" or some other Perl function to do this? My first preference is to use a built in Perl function, My next preference is to use a standard Perl module (the ones that come with Perl when you install it).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Finding the Ethernet Address
by socketdave (Curate) on May 30, 2006 at 16:18 UTC | |
Re: Finding the Ethernet Address
by sgifford (Prior) on May 30, 2006 at 16:17 UTC | |
Re: Finding the Ethernet Address
by gellyfish (Monsignor) on May 30, 2006 at 16:03 UTC | |
Re: Finding the Ethernet Address
by jdtoronto (Prior) on May 30, 2006 at 16:54 UTC | |
Re: Finding the Ethernet Address
by ikegami (Patriarch) on May 30, 2006 at 16:37 UTC | |
Re: Finding the Ethernet Address
by qazwart (Scribe) on May 30, 2006 at 19:08 UTC | |
Re: Finding the Ethernet Address
by converter (Priest) on May 31, 2006 at 11:23 UTC |
Back to
Seekers of Perl Wisdom