Hello Perl Guru's
I am playing with two text files using perl but i have been end up after a one day effort and got nothing there fore i have decided to post some thing here for help well here are some details that what actually i want to do
(I am genarating one file from shell script and on the end of execution this file will be renamed to file_old and after that a shell script will be executed on next day and it will generate a file with name file_new and then i want to compare both the files that is if a value of col2 has been changed then show me the value of col1 either from FileA or FileB)
I have two text files name FileA and FileB and both files have two columns like
FileA
Col1 Col2
ABC 123
ABC 987
DEF 456
DEF 898
DEF 658
GHI 789
and FileB also have two columns and it looks like
Col1 Col2
ABC 123
ABC 987
DEF 456
DEF 898
DEF 658
GHI 789
GHI 435
GHI 654
KLM 543
KLM 123
KLM 324
now i want to compare the col2 of both files against col1 if any data in col2 has moved in first or second file then show me the value in col1 from both files i.e., if data has moved from fileA to fileB then show me the col1 value of fileB and if data has moved from fileB to fileA then show me the col1 value of fileA
Thanks in advance
Omer