in reply to Re: Re: Re: Accessing NIC/mac address ?
in thread Accessing NIC/mac address ?
I was not aware of the /all switch. Thanks! That's very useful.
Just to round out the thread:
#! Perl -w use strict; open (READ, "ipconfig /all|") or die "$!"; while (<READ>) { chomp; if (/Physical Address/) { my @pieces = split(/:/); print $pieces[1]; } } close READ;
|
---|
In Section
Seekers of Perl Wisdom