in reply to how to compare elements of two multi-dimensional arrays
Sometimes index, grep and others could be used to replace the inner loop.for my $a (@array1) { for my $b (@array2) { next if $a ne $b; # Do whatever tests you need here # Do the work here } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: how to compare elements of two multi-dimensional arrays
by GrandFather (Saint) on Oct 05, 2009 at 10:44 UTC |