On Thu, 22 Aug 2002 08:49:10 +0200, [EMAIL PROTECTED] (Gaël Blanchet) wrote:
>Hello >I need to write a script which give mac address when I give IP address of >my LAN. > >But I can't find which module I need to use. > >If someone knows it, can he help me. You should put something descriptive in your subject line like "MAC script wanted". This helps others looking thru archives. Run as root: ########################################## #!/usr/bin/perl use strict; use warnings; open (READ, "ifconfig |") or die "$!"; while (<READ>) { chomp; if (/Ether/) { my @mac = split(/\s+/,$_); print "$mac[0] is $mac[4]\n"; }} close READ; ####################################### -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]