!/usr/bin/perl use strict; my %list; my @a = qw( 1 2 3 ); my @b = qw( 3 1 5 ); for my $i (@a) { $list{$i}++ if ( grep /$i/, @b ); } print "Results:\n" . join ", ", keys %list;
In reply to Re: comparing two array
by bichonfrise74
in thread comparing two array
by paola82
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |