| my $f1=shift; | my $f2=shift; | open (F1,$f1)||die; | open (F2,$f2)||die; | my @accn1=<F1>; | my @accn2=<F2>; | my @unique1; | foreach my $accn (@accn1) { | push @unique1,$accn unless (grep(/$accn/, at accn2)); | } This also just does one half (F1-F2). You need to add F2-F1 to it. T