use strict; my @A = (2..5); my @B = (4..7); my @A_not_B; foreach my $data ( @A ) { push @A_not_B, $data unless grep { $_ eq $data } @B; } print "FINAL :: @A_not_B \n";
In reply to Re: How do I pick anything that is in array A that is NOT in array B
by gansi
in thread How do I pick anything that is in array A that is NOT in array B
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |