I haven't tested this code, but I am pretty sure that would do it. And if it is an NT machine you would just do something similar with ipconfig instead. Note you should replace fxp0 with the name of your network device. Update: I just tested the code and it worked.open (READ, "ifconfig fxp0 |") or die "$!"; while (<READ>) { chomp; if (/ether/) { s/^\s+//; my $mac = (split)[1]; } } close READ;
In reply to Re: Accessing NIC/mac address ?
by PrimeLord
in thread Accessing NIC/mac address ?
by peterg22
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |