Problems? Is your data what you think it is? | |
PerlMonks |
Re: Accessing NIC/mac address ?by rob_au (Abbot) |
on Feb 15, 2002 at 03:43 UTC ( [id://145611]=note: print w/replies, xml ) | Need Help?? |
If you are running this on a *NIX based platform, you should look into the IO::Interface module - This module gives you access to a wealth of information about network interface configurations. For example, from the documentation ...
If all that you are looking for is the MAC address of the interface card, then the $obj->if_hwaddr method is all you will need to worry about.
perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'
In Section
Seekers of Perl Wisdom
|
|