I have two arrays, @a and @b. I want to do a compare among the elements of the two arrays.
@a
@b
my @a = qw\"abc def efg ghy klm ghn\"; m
If you would consider the arrays with different order to be different, you may use Array::Diff
if (Array::Diff->diff(\@a, \@b)->count) { # not_same } else { # same }