Hi,
If the take the difference of two files, one having 13423 and other 12354.
The difference is around 1100(approx).
But if the contents of the file if I copy to an array and
use the below code, the difference is only 200(approx).
How can I get the exact count as
diff file1 file2.
@union = @intersection = @difference = ();
%count = ();
foreach $element (@array1, @array2) { $count{$element}++ }
foreach $element (keys %count) {
push @union, $element;
push @{ $count{$element} > 1 ? \@intersection : \@diff
+erence }, $element;
}