Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: Re: Accessing NIC/mac address ?

by earthboundmisfit (Chaplain)
on Feb 14, 2002 at 18:19 UTC ( [id://145523] : note . print w/replies, xml ) Need Help??


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;