in reply to Re^4: file comparison
in thread file comparison
Let's back up a minute and think about the problem.
To do the comparison, you need
- the file to be compared (file_a)
- the file to compare with (file_b)
- a method of doing the comparison
Given two lists of files (@file_a) and (@file_b), then you just need to take one from column a and one from column b, apply the comparision method, and check the result. For example you could:
So you have two separate problems: first generating the two lists of files so that the appropriate files match up in each list, then doing the proper digest.$fa = shift(@file_a); $fb = shift(@file_b); if (digest($fa) == digest($fb)) # digest=whatever method you prefer # use eq instead of == if digest retur +ns a string { # files match }
In Section
Seekers of Perl Wisdom