pravin pawar 0 Newbie Poster

How can i find the mac address of all computers and which loop i used for

[B]#!/usr/bin/perl

$file ="/etc/sysconfig/network-scripts/ifcfg-eth0";

open (MYFILE, "$file");
        $file1 = <MYFILE>;
while ($file1 ne "") {

        chomp ($file1);

        $file1 = <MYFILE>;

for ($values = 0; $values < 5; $values++) {

        if ($file1 =~ /HWADDR/){

                @values = split(/=/,$file1);
        print $values[1];

         }
     }
[/B]