> Does someone know if the array::compare module can handle array of
> arrays?
I haven't seen anyone answer this yet. Based on the documentation
(http://theoryx5.uwinnipeg.ca/CPAN/data/Array-Compare/Compare.html),
Array::Compare takes 2 arrays and tells you if they are the same, or
different, with the additional option of reporting the elements which are
different.
An 'array of arrays' is actually an array of _references_ to arrays. Are
you wanting to compare each array to every other array? You could do that
by dereferencing pairs of arrays and using Array::Compare on each of them
(but this could be timeconsuming with a lot of arrays).
E.g.
foreach ( @array_of_arrayrefs ) {
my @array_copy = @array_of_arrayrefs; # make a copy to test against
my @test_arr1 = @{$_}; # dereference array
foreach ( @array_copy ) {
my @test_arr2 = @{$_};
#Do Array::Compare stuff here with @test_arr1 and @test_arr2
}
}
This needs some tidying up, a more efficient algorithm, and getting the
results of the comparisons, but I hope it is a start.
Best wishes,
Rachel
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]