archer has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks, I have to compare the contents of two files and the output should be a report which should give the text that is present in file1 and not in file2 and vice versa. Which logic can i use to implement the same??
File 1: "This is a site for perl questions.Really helpful!!!"
File 2: "This is a site where you get your perl queries cleared.Really helpful!!!"
The output should be:
"for perl questions." - present in file 1 but not in file 2
"where you get your perl queries cleared." - present in file 2 but not in file 1
How to achieve this???
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Comparing the contents of two files
by moritz (Cardinal) on Aug 02, 2011 at 12:58 UTC | |
Re: Comparing the contents of two files
by derby (Abbot) on Aug 02, 2011 at 14:27 UTC | |
Re: Comparing the contents of two files
by JavaFan (Canon) on Aug 02, 2011 at 16:57 UTC | |
Re: Comparing the contents of two files
by onelesd (Pilgrim) on Aug 02, 2011 at 21:04 UTC |
Back to
Seekers of Perl Wisdom