yes my bad, i actually figured that problem out myself.
It runs fine now, however i don't think it's doing what it is supposed to on the bottom half codes
As you know, i'm trying to compare each row of first column, and if it doesn't equal i want it to count the each unmatched rows and print it out the number of counts.
However, i think my code is not comparing each row but the reference to the array, so it gives me unmatched counts although my files have no unmacthed rows.
So my question is, why isn't comparing each row individually, and how can i fix it to make it work ?
Thanks,
my $unmatched = 0 ;
my @names;
my $filecount1 =$filecount-1;
for (my$chr =1; $chr <= $filecount1; $chr++){
if ($row[0] ne $row[$chr]) {
$names[$unmatched] =$filename[$chr];
$unmatched++;
}
print "Total # of files compared: $filecount \n";
print "Total # of files unmatched: $unmatched\n";
print "name of the files unmatched : @names \n " ;
}