<div>are the 2 arrays items in the same order?<br></div><div>in the reference it says:</div><div>"Internally the comparator compares the two arrays by using join to turn both arrays into strings and comparing the strings using eq."</div>
<div>so I guess that if the first array has 1,2,3,4,5 and the second one 5,4,3,2,1 the Array::Compare returns false...</div><div>is this what you mean?</div><div><br></div><div> -Ilaria-</div><br><div class="gmail_quote">
On Tue, Oct 6, 2009 at 12:32 PM, Paola Bisignano <span dir="ltr"><<a href="mailto:paola.bisignano@gmail.com">paola.bisignano@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
I have two lists of numbers, saved in two files and I want to compare<br>
them, in order to check which are the same elements in both lists. I<br>
put them into array, so I want to compare array, but I only want to<br>
check the value, and It doesn't matter for the position in the array,<br>
I tried to use Array::Compare<br>
<br>
<br>
<br>
open (OUT, "> $file");<br>
my $comp = Array::Compare-> new;<br>
if ($comp->compare(\@array_num1, \@array_num2))<br>
{<br>
print "$comp\n";<br>
print OUT "$comp\n";<br>
}<br>
close OUT;<br>
<br>
but it returns blank, I don't know why...<br>
_______________________________________________<br>
Milan-pm mailing list<br>
<a href="mailto:Milan-pm@pm.org">Milan-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/milan-pm" target="_blank">http://mail.pm.org/mailman/listinfo/milan-pm</a><br>
</blockquote></div><br>