Hi All,
I have two files to compare. Each has 10 columns with first 4 columns being key index together. The rest of the columns have monetary values.
I want to read one file into hash; check for the key value availability in file 2; then compare the values in the rest of 6 columns; report the differences found.
The files are comman separated and do not have header
Here is the sample file:
File A:
Row1: abcd,abrd,fun,D000,$15,$236,$217,$200,$200,$200
Row2: dear,dare,tun,D000,$12.00405,$234.08976,$212.09876,$200,$200,$200
File B:
Row1: abcd,abrd,fun,D000,$12,$234,$212,$200,$200,$200
Row2: dear,dare,tun,D000,$12.00405,$234.08976,$212.09876,$200,$200,$200
Output:
Difference found for index abcd,abrd,fun,D000 for field 5,6 and 7
Any help would be appreciated. I am able to come up with the script in Bash, but not very comfortable with the concept of Hash in Perl and also setting up key index columns.
Thanks!