use List::Compare; use strict; open (F, "a.txt")||die("a.txt File cannot open\n"); open (S, "b.txt")||die("b.txt File cannot open\n"); my @a=; my @b=; my $lcma = List::Compare->new(\@a, \@b); print $lcma->get_complement ,"\n"; # extra present in the second array print $lcma->get_unique ,"\n"; # extra present in the First array