http://qs1969.pair.com?node_id=145523


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;