in reply to Re^2: adding arrays to an array
in thread adding arrays to an array

> "Global symbol "@row1" requires explicit package name..."

That's another bug!

Tips:

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

¹) see Coping with Scoping

²) see How (not) to ask a question

³) see diagnostics

update

I have no time to test your code, but you should at least put some efforts to properly intent it!

Replies are listed 'Best First'.
Re^4: adding arrays to an array
by coolda (Novice) on Oct 24, 2014 at 16:12 UTC
    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 " ; }