Hi All,
I have a simple perl script which subtracts two variables holding decimal numbers and the results is not as expected.
$a = 417747646.853143
$b = 417747646.853142
$c = $a-$b
expected result = $0.000001
actual result = -9.5367431640625e-07
any idea on why I am getting wrong results?
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...
Thanks Annihilannic!!!! This code works like a miracle!
I still have one question though. When I run this code on my files, I see that the output still shows the difference because of scientific value representation.
Here is a sample output:
key 10139 D000 field 4 differs: -1.19119e+06...
Thanks for the response!
Now that I read through your code, I am getting confused with variable File1. Since both the files names are same in the two directories, now that I am trying to replace the names as per my requirement and just not sure which file is what. can you detail your code...
Thanks for the response!
The fields are tab delimited. Just for clarity purpose I used ";".
I will try this code. But I need two other checks to be performed as well:
1. MAtch th enumber of records on both files. It should e same.
2. The values being compared are reprensented differently. For...
I have "n" files in directory A and "n" files in directory B. The files are expected to be the same with same data. Each file has 14 columns and "x" rows. Of the 14 column, 2 columns are to be considered as key identifiers. Based on this unique combination, I need to compare each field value...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.