Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: (files)

I wish to compare the lines from file1.txt with file2.txt and export what are the missing lines not found in file2.txt to another result.txt

Originally posted as a Categorized Question.

  • Comment on How do I compare the lines in two text file?

Replies are listed 'Best First'.
Re: How do I compare the lines in two text file?
by lhoward (Vicar) on Jul 31, 2000 at 16:23 UTC
    The CPAN module Algorithm::Diff is also built for doing this sort of thing.
Re: How do I compare the lines in two text file?
by davorg (Chancellor) on Jul 31, 2000 at 10:35 UTC

    If you're on a system that supports it, the easiest way might be to use the Unix diff command.

    For a pure Perl solution, you might be able to do something with the Array::Compare module from CPAN.