Or just use Perl's 'smart' operator (no hash needed):
print $_ ~~ @array2 ? "$_: Match!\n" : "$_: No Match\n" for @array1;
In reply to Re^2: Matching 2 unordered arrays then printing the first array highlighting the matches?
by Kenosis
in thread Matching 2 unordered arrays then printing the first array highlighting the matches?
by fraizerangus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |