Hi All, I need a perl script to generate the following
Replace value in a column of one file with a value from second file
File1
246 0.668 20.644 20.610 0.000 3 U 1.039e+03 0.000E+00 - 0 1673 1676 1663 1662
18 0.816 22.786 24.906 0.000 3 U 1.815e+03 0.000E+00 - 0 1760 1761 1743 1744
248 0.816 22.786 24.906 0.000 3 U 1.856e+03 0.000E+00 - 0 1760 1761 1763 1764
File2
1681 1.035 0.000 HD2 86
1744 22.256 0.000 CD2 86
1662 25.318 0.000 CD1 86
1685 26.309 0.000 CG 86
Column 15 in first file should find a match in column 1 of file2. Then column 4 in file1 should be replaced by value from column 2 of file2
Output should be like this
13 0.668 20.644 20.610 1.035 3 U 5.118e+02 0.000E+00 - 0 1659 1658 1680 1681
246 0.668 20.644 20.610 25.318 3 U 1.039e+03 0.000E+00 - 0 1673 1676 1663 1662
Thanks in advance
Surya