Another way to do it is to use Array::Utils
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
}
# get items from array @a that are not in array @b
my @minus = array_minus( @a, @b );
Center one and right/left align other flexbox element
How to store objects in HTML5 localStorage/sessionStorage
How do I modify the URL without reloading the page?
Why doesnt percentage height work in HTML/CSS?
How can I validate an email address in JavaScript?
How can I vertically center a div element for all browsers using CSS?
How can I horizontally center an element?
Get top n records for each group of grouped results
Connect Java to a MySQL database
Syntax error due to using a reserved word as a table or column name in MySQL