use List::Compare; use Data::Dumper; s/\A\s+|\s+\z//g for @array1, @array2; my $lc = List::Compare->new(\@array1, \@array2); my @i = $lc->get_intersection(); print Data::Dumper->Dump([\@i]);
In reply to Re: compare 2 arrays of strings
by eff_i_g
in thread compare 2 arrays of strings
by sharan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |