# @array1 and @array2 are what are tested my %test; map {$test{$_}=undef} @array1; my @result; foreach (@array2) { push (@result,$_) if (exists($test{$_})); }
In reply to Re: how to compare 2 array
by Hena
in thread how to compare 2 array
by ab323i
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |