noviceuser has asked for the wisdom of the Perl Monks concerning the following question:
i have to compare two arrays to check if both are exactly same or not irrespective of which elements come at which position
here @failedTestsuites is first array and @referenceTestsuites is second array, i have tried below code but it is not giving desired result. one of the case is: suppose @failedTestsuites array contains 'a','b','c' and @referenceTestsuites array contains 'a','b' then also it is printing both array as same. please help
my $comp = Array::Compare->new; if ($comp->compare(\@failedTestsuites, \@referenceTestsuites)) { print "same arrays\n"; } else { print "different arrays\n"; }
|
|---|