[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] How to get ethernet addr macperl?



Well, here is how I am doing it now.  Note that the ethernet hardware address is
also known as the MAC address.  It is different than the TCP/IP address.  I use
DoAppleScipt and the Network Info OSAX from Carl Bell at Baylor
<http://www.baylor.edu/~Carl_Bell/>:

# get ethernet address
$mac = MacPerl::DoAppleScript (<<EOS);
  set netinfo to (network information) as list
  set myaddr to item 1 of netinfo
  return myaddr
EOS
print "The MAC address is $mac\n";

# get rid of the colons for my purpose
$mac =~ s/://g;
print "The MAC address is $mac\n";

--
Sincerely,
Leo Wierzbowski

http://grove.ufl.edu/~leo/

"If a man is dishonest he should be driven from public life."
 (Theodore Roosevelt, "The Best and the Good,"
 in "The Strenuous Life")

 "The University of Florida does not endorse or
 disendorse the content of this document.
 Everything is the author's private opinion."



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch