in reply to New Perl programmer looking for answer in Directory Comparisons

The problem is in these lines. On each iteration, the code clobbers whatever's in the hash already:
foreach $filename1 (@sourcesorted) { %hashsource = ($filename1,$filename1); }
To fix it, I'd probably do something like this:
my %hashsource; @hashsource{@sourcesorted} = @sourcesorted;
That does what you intend, by assigning a list of keys to a list of values.

There are other things to correct in the code, but that will fix the issue you described.

Replies are listed 'Best First'.
Re: Re: New Perl programmer looking for answer in Directory Comparisons
by ATaylor (Initiate) on May 01, 2001 at 19:56 UTC
    Thank you for the help. I am already on it with the previous suggestions. Thank you again, Aaron Taylor