posted 15 years ago
Detailed explanation:
hai.txt
-------
designation: Manager
name: David
age: 40
designation: Programmer
name: Bob
age: 32
designation: DBA
name: Bill
age: 50
bye.txt
--------
designation: Manager
name: Alex
age: 41
designation: Manager
name: David
age: 40
designation: Analyst
name: Mary
age: 45
designation: Programmer
name: Bob
age: 35
designation: DBA
name: Jack
age: 50
designation: Lead
name: Jim
age: 47
First perl routine should take hai.txt first entry designation and compare with bye.txt's all designation. If it does not match with any of the designation in bye.txt, it should write designation value in result.txt file like designation: Programmer does not match.
If designation matches, then it should check name.(eg: designation: DBA matches in both the file, but name Bill and Jack does not match. This should entered in another file result1.txt like designation: DBA name: Bill and Jack does not match.
Next level of comparison: If designation and name matches then it should compare age, if age differs entered in file result1.txt like designation: Programmer name: Bob age: 32 and 35 does not match.