Try using Perl, not C ;-)
--my @array1 = qw/a b c d e f/; my @array2 = qw/ b c d /; # you see: result must be a, e and f my @in1notin2 = do { my %tmp = map {($_=>undef)} @array2; grep not exists $tmp{$_}, @array1 }; print "The elements @in1notin2 can be found in array 1, but not in arr +ay 2\n";
In reply to Re: Comparing Two arrays
by fruiture
in thread Comparing Two arrays
by johnirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |