Array::Utils module contains small utils for array manipulation.
SYNOPSIS
use Array::Utils qw(:all);
my @a = qw( a b c d );
my @b = qw( c d e f );
# symmetric difference
my @diff = array_diff(@a, @b);
# intersection
my @isect = intersect(@a, @b);
# unique union
my @unique = unique(@a, @b);
# check if arrays contain same members
if ( !array_diff(@a, @b) ) {
# do something
}
FUNCTIONS
unique
Returns an array of unique items in the arguments list.
intersect
Returns an intersection of two arrays passed as arguments.
array_diff
Return symmetric difference of two arrays passed as arguments
Product's homepage
Requirements:
· Perl