#!/usr/bin/perl #comp.pl - compares two lists, and combines them into a third unique #list with no matching elements. Written for mercs, by Digital Ebola. #Much thanks to super, who helped out with the array comparisons. #Digital Ebola - 5/11/2001 my ($file1, $file2, $file3) = @ARGV; if (! @ARGV) { die "Usage: comp.pl listfile listfile completelist\n"; } open(FILE1,$file1) or die "Can't open $file1: $!\n"; open(FILE2,$file2) or die "Can't open $file2: $!\n"; open(FILE3, ">$file3"); @list1=; @list2=; print FILE3 @list2; for(my$i=0;$i<@list1;$i++) { print FILE3$list1[$i]if$list1[$i]ne$list2[$i]; }