in reply to comparing 2 files and creating third file with uncommon content

If this is not just for the sake of learning to use Perl, this type of task can be done with well known command line tools e.g.
diff -n file1 file2 | egrep -v '^[ad]' > file3
will find the differences and write them to file3.

You may need to install cygwin or native versions of these tools.

  • Comment on Re: comparing 2 files and creating third file with uncommon content
  • Download Code

Replies are listed 'Best First'.
Re^2: comparing 2 files and creating third file with uncommon content
by fullermd (Vicar) on Jun 18, 2014 at 18:19 UTC

    Or just use comm(1).