in reply to How do I pick anything that is in array A that is NOT in array B
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";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How do I pick anything that is in array A that is NOT in array B
by MidLifeXis (Monsignor) on Jan 27, 2010 at 16:55 UTC |